The MassTransit format¶
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.
Exchange messages with .NET services that use MassTransit, from a Go service on the estate's bus.
gitlab.com/phpboyscout/go/envelope-masstransit
is the MassTransit adapter for go/envelope. It is released (v0.1.0). MassTransit() is
MassTransit's JSON message envelope, as its System.Text.Json serializer writes it, as an
envelope.Format:
Give it to a go/messaging adapter as the writer to publish to MassTransit consumers, or add it to the
reader chain to read what MassTransit producers send. envelope.Read tells it apart from CloudEvents
by its content type, application/vnd.masstransit+json.
It refuses, at publish, what MassTransit cannot carry: an ID that is not a UUID, and a payload that is
not JSON. sentTime is kept to the .NET tick, 100 ns. What a MassTransit message carries that the
event has no place for arrives as envelope.Foreign.
It was captured from MassTransit 8.5.10; see Tested versions. The design is go/messaging's spec 0014, D2, D9 and D10. Where this section and the spec differ, this section describes the code.
Start here¶
Exchange a message with a MassTransit consumer writes an event Go-side, has a .NET consumer read it, and reads a message MassTransit itself sent.
Do a task¶
- Write to MassTransit
- Read from MassTransit
- Carry headers and foreign fields
- Handle what MassTransit refuses
- Check a message against a real consumer