MassTransit is the reference for MyServiceBus, and the project strives for full compatibility with MassTransit's messages, protocol, and transport behavior. The following differences are significant:
- Unified bus interface – a single
IMessageBushandles send, publish and request/response instead ofIBus/IBusControl. - Cross-language implementations – MyServiceBus provides parallel C# and Java clients; MassTransit targets .NET only.
- Simplified configuration – registration uses
AddServiceBuswith transport-specific configurators rather than separate builders likeAddMassTransit. - Lightweight dependencies – both clients rely on minimal DI and logging abstractions (e.g.,
Microsoft.Extensionsvs.javax.injectwith a default Guice adapter and SLF4J). - Pluggable transports – brokers are accessed through an
ITransportFactoryso implementations such as RabbitMQ can be swapped without changing application code. - Request client factories –
IRequestClientFactoryandRequestClientFactorycreate request/response clients instead of MassTransit's extensions onIBus. - Configurable retries – both clients opt into consumer retries through filters instead of applying them by default.
- Built-in extensibility – filters, pipeline registration, and retry policies are configured via MyServiceBus APIs, allowing future pipeline strategies that differ from MassTransit.
- Manual Java lifecycle – Java applications start the bus explicitly, whereas MassTransit integrates with ASP.NET hosting.
- Exception documentation – the C# client uses typed exceptions with XML docs for notable public exceptions, while the Java client uses checked or runtime exceptions to surface errors.
- Typed filter registry – the Java client selects filters at runtime using a registry keyed by context and message
Classtokens, while MassTransit and the C# client bind filters via generics.
Despite these differences, MyServiceBus aligns with MassTransit's message envelope format, pipe-and-filter pipeline, fault contracts, and transport abstractions so clients can interoperate across both projects.