Private
constructorOptional
eventSigning: Required<Pick<ValueObject<{ Private
brokerPrivate
eventPrivate
Optional
eventPrivate
isPrivate
Optional
lastPrivate
loggerPrivate
publicationsPrivate
subscriptionsPrivate
Static
instanceAttaches a MessageHandler to a subscriptions "On Message" event.
The message handler class to handle a specific message type
Apply middleware on receiving a message
Private
attachPrivate
getPrivate
getUnsubscribes from the 'broker_error' event.
The event name ('broker_error').
The callback function to remove.
Unsubscribes from the 'broker_reconnected' event.
The event name ('broker_reconnected').
The callback function to remove.
Subscribes to the 'broker_error' event, which is emitted when the broker encounters an error.
The event name ('broker_error').
A callback function that receives a BrokerErrorEvent
object containing:
error
: The error that occurred.connection
: Details about the connection where the error occurred.Subscribes to the 'broker_reconnected' event, which is emitted when the broker successfully reconnects.
The event name ('broker_reconnected').
A callback function that receives a BrokerReconnectedEvent
object containing:
connection
: Details about the re-established connection.disconnectedDurationInMilliseconds
: The duration (in milliseconds) for which the connection was lost.Private
onPrivate
onPrivate
onPrivate
onPrivate
onPrivate
onThe (database) ID of the aggregate type or use the const UNKNOWN_AGGREGATE_ID or MULTIPLE_AGGREGATE_IDS values.
The aggregate type and message type e.g. channel
and ChannelPublishedEvent
message payload
Optional
envelopeOverrides: MessageEnvelopeOverridesexplicitly defined message envelope values, e.g. auth token or message context
Optional
options: PublicationConfigexplicitly defined message options, e.g. if additional header values should be passed
please use publishCommand
or publishEvent
instead.
Publish a message with a defined routing key.
Publish a command message with a defined routing key.
The (database) ID of the aggregate type or use the const UNKNOWN_AGGREGATE_ID or MULTIPLE_AGGREGATE_IDS values.
The aggregate type and message type e.g. image
and EnsureImageExists
message payload
Optional
envelopeOverrides: MessageEnvelopeOverridesexplicitly defined message envelope values, e.g. auth token or message context
Optional
commandConfig: PublicationConfigexplicitly defined command configuration, e.g. if additional header values should be passed
Publish an event message with a defined routing key.
The (database) ID of the aggregate type or use the const UNKNOWN_AGGREGATE_ID or MULTIPLE_AGGREGATE_IDS values.
The aggregate type and message type e.g. channel
and ChannelPublishedEvent
message payload
Optional
envelopeOverrides: MessageEnvelopeOverridesexplicitly defined message envelope values, e.g. auth token or message context
Optional
eventConfig: PublicationConfigexplicitly defined event configuration, e.g. if additional header values should be passed
Wrapper for a default rascal subscribe method, allowing explicit subscription to a queue using a dedicated routing key. Consider using addMessageHandler to initialize a subscription and directly attach a message handled to be executed on message received event.
Optional
overrides: SubscriptionConfigStatic
createInitializes a rascal broker instance using a rascal config and components
Optional
signing: Required<Pick<ValueObject<{ Generated using TypeDoc
A wrapper around rascal broker to be used by Mosaic services.