Skip to content

MassTransit errors and constants

Warning

MassTransit 9 is commercially licensed. MassTransit 9 and later is under the MassTransit Commercial Software License Agreement (massient.com/license), a paid subscription with no exemption for testing. This format was captured from MassTransit 8, which is Apache-2.0, and the module's own .NET test programs stay on 8.x (envelope-masstransit#1). The Go module itself does not depend on MassTransit.

ErrInvalidEnvelope

var ErrInvalidEnvelope = errors.NewSentinel("masstransit.invalid_envelope",
    "masstransit: the body is not a valid MassTransit JSON envelope")

Returned by Decode when a body claimed as MassTransit's is not a MassTransit JSON envelope. The causes are in What the MassTransit format refuses. Every other refusal is a go/envelope sentinel, listed in Errors, so it is counted by the same code whichever format carried the event.

Constants

Name Value
ContentType application/vnd.masstransit+json
MessageTypePrefix urn:message:
Precision 100 * time.Nanosecond, sentTime's: a .NET tick
HeaderSubject ce-subject
HeaderDataSchema ce-dataschema
HeaderDataContentType ce-datacontenttype

Function

func MassTransit() envelope.Format

The format's String method returns masstransit, which is how it is named in an ErrAmbiguous or ErrUnrecognised.

The API is on pkg.go.dev.