[−][src]Crate svc_agent
Overview
svc-agent is a library implementing common MQTT agent messaging pattern conventions and abstracting out the protocol's specifics to enable building microservices with full-duplex communication.
On the broker side its counterpart is mqtt-gateway plugin for VerneMQ.
Key concepts
svc-agent is about exchanging messages between agents using pub-sub model.
An agent is a service or end user who can publish and subscribe to messages. Each agent has a unique AgentId.
Message can be of three types:
- Requests that end users send to services. Services may call other services too.
- Responses that services send back.
- Events that just may happen in services and it pushes a notification to subscribers.
Each outgoing message has a Destination and each incoming message has a Source which can also be of three types:
- Broadcast that is being received by each of the subscribed agents.
- Multicast that is being received by only one agent of a SharedGroup of subscribers.
- Unicast that is intended for a specific agent.
Re-exports
pub use self::error::Error; |
Modules
error | |
mqtt | |
request |
Structs
AccountId | |
AgentId | Agent identifier. |
EventSubscription | |
RequestSubscription | |
ResponseSubscription | |
SharedGroup | A group of agents which shares a subscription. Commonly used for balancing requests over a group of instances of some service. |
Subscription | Messages subscription builder. |
Enums
Destination | Message destination. |
Source | Message source. |
Traits
Addressable | Something that can be addressed as agent. |
Authenticable |