Skip to main content

Module message_bus

Module message_bus 

Source
Expand description

Inter-agent message bus for multi-agent communication.

Provides a broadcast-based message bus that agents can use to communicate with each other in an oxicode environment.

§Lag Handling

The underlying tokio::sync::broadcast channel has a fixed capacity. Slow consumers will have old messages automatically dropped. Use MessageBus::subscribe_lag_aware to receive a LagAwareReceiver that logs a warning when messages are skipped due to lagging.

Structs§

InterAgentMessage
A message sent between agents.
LagAwareReceiver
A broadcast receiver that logs warnings when messages are dropped due to lagging instead of silently losing them.
MessageBus
Broadcast-based message bus for inter-agent communication.

Enums§

PublishResult
Result of a publish operation on the message bus.