Module msgbus

Source
Expand description

A common in-memory MessageBus supporting multiple messaging patterns:

  • Point-to-Point
  • Pub/Sub
  • Request/Response

Re-exports§

pub use core::MessageBus;
pub use crate::msgbus::core::MStr;
pub use crate::msgbus::core::Pattern;
pub use crate::msgbus::core::Topic;
pub use crate::msgbus::message::BusMessage;

Modules§

core
database
handler
Message handler functionality for the message bus system.
listener
matching
message
stubs
switchboard

Functions§

deregister
Deregisters the handler for the endpoint address.
get_message_bus
Gets the thread-local message bus.
is_subscribed
publish
Publishes the message to the topic.
publish_data
Publish [Data] to a topic.
register
Registers the handler for the endpoint address.
register_response_handler
response
Sends the response to the handler registered for the correlation_id (if found).
send
Sends the message to the endpoint.
send_any
Sends the message to the endpoint.
send_response
Sends the DataResponse to the registered correlation ID handler.
set_message_bus
Sets the thread-local message bus.
subscribe
Subscribes the handler to the pattern with an optional priority.
subscribe_str
subscribe_topic
subscriptions_count
unsubscribe
Unsubscribes the handler from the pattern.
unsubscribe_str
unsubscribe_topic