Extension Points
ServiceConnect is built around small, well-defined interfaces. Implementing one of the transport, persistence, or serialization interfaces lets you swap that piece of the runtime without touching the rest. The registries listed further down are concrete classes the bus instantiates itself — they are documented for inspection and bespoke tooling, not as interfaces you implement to swap a runtime piece.
Transport
Section titled “Transport”ITransportProducer— outbound publish/send/sendBytes.ITransportConsumer— inbound consumer lifecycle and delivery loop.
Persistence
Section titled “Persistence”ISagaStore— saga state with optimistic concurrency.IAggregatorStore— buffered messages, lease-based flush.ITimeoutStore— scheduled saga timeouts.
Serialization
Section titled “Serialization”IMessageSerializer— bytes to and from a typed message.IMessageTypeRegistry— type-name to schema/parents.
Registries
Section titled “Registries”These are concrete classes, not interfaces you implement. ProcessRegistry and AggregatorRegistry are exported from @serviceconnect/core; HandlerRegistry is internal and not part of the published surface.
HandlerRegistry— handler dispatch with polymorphic ancestor walk (internal; not exported).ProcessRegistry— saga handler registry.AggregatorRegistry— aggregator handler registry.
Request / reply correlation
Section titled “Request / reply correlation”The bus’s request/reply machinery is driven by RequestReplyManager. You almost never instantiate it directly — createBus builds one and the public bus.sendRequest / bus.sendRequestMulti / bus.publishRequest methods are the supported surface. The class and its registration types are exported for the rare case of a custom transport that wants to drive the manager from its own dispatch loop:
RequestReplyManager— the correlation table that maps outboundrequestMessageIds to pending promises (or per-reply callbacks). Methods:registerSingle,registerMulti,registerCallback,tryRouteReply,cancel,shutdown.SingleRequestRegistration/MultiRequestRegistration/CallbackRequestRegistration— the three pending-request shapes the manager tracks.RegisterSingleOptions/RegisterMultiOptions— the options bags passed when registering a pending request.
The implementations shipped in this monorepo (@serviceconnect/rabbitmq, @serviceconnect/persistence-memory, @serviceconnect/persistence-mongodb) are themselves the best reference for what a real implementation looks like.