Class LoopbackBroker
An in-process broker.
public sealed class LoopbackBroker : IDisposable
- Inheritance
-
LoopbackBroker
- Implements
- Inherited Members
Remarks
Every transport built from one broker shares its traffic, so a message one publishes reaches the others that subscribed to the topic. It exists so a caller can exercise a whole message flow with no broker, no network, and no hardware, which is what makes that flow testable from a unit test.
Constructors
LoopbackBroker()
Creates a broker with no traffic.
public LoopbackBroker()
Exceptions
- PamojaException
The native broker could not be created.
Properties
Reachable
Gets or sets whether the broker is in reach.
public bool Reachable { get; set; }
Property Value
Remarks
Set it to false to put every link on the broker out of range at once,
links a ladder owns included: they fail to connect, send, or subscribe until
it is true again, keeping their connections and filters through the
outage.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Link()
Creates a link to this broker, for driving directly.
public LoopbackTransport Link()
Returns
- LoopbackTransport
The link.
Rung()
Creates a link to this broker as a composable transport.
public Transport Rung()
Returns
- Transport
The transport, ready to add as a rung.