Expand description
A common in-memory MessageBus
supporting multiple messaging patterns:
- Point-to-Point
- Pub/Sub
- Request/Response
Re-exports§
pub use crate::msgbus::message::BusMessage;
Modules§
- database
- handler
- Message handler functionality for the message bus system.
- listener
- message
- stubs
- switchboard
Structs§
- Message
Bus - A generic message bus to facilitate various messaging patterns.
- Shareable
Message Bus - Subscription
- Represents a subscription to a particular topic.
Functions§
- deregister
- Deregisters the handler for the
endpoint
address. - get_
message_ bus - Gets the global message bus.
- is_
matching - Match a topic and a string pattern pattern can contains - ‘*’ - match 0 or more characters after this ‘?’ - match any character once ‘a-z’ - match the specific character
- is_
subscribed - publish
- Publishes the
message
to thetopic
. - register
- Registers the
handler
for theendpoint
address. - response
- Sends the
response
to the handler registered for thecorrelation_id
(if found). - send
- Sends the
message
to theendpoint
. - set_
message_ bus - Sets the global message bus.
- subscribe
- Subscribes the given
handler
to thetopic
with an optionalpriority
. - subscriptions_
count - unsubscribe
- Unsubscribes the
handler
from thetopic
.