60 releases

0.21.0 Jun 22, 2023
0.19.5 Aug 1, 2022
0.19.4 Sep 29, 2021
0.17.0 Jun 15, 2021
0.3.1 Mar 5, 2019

#1202 in Network programming

Download history 260/week @ 2024-02-26 35/week @ 2024-03-04 53/week @ 2024-03-11 12/week @ 2024-03-18 110/week @ 2024-03-25 167/week @ 2024-04-01 4/week @ 2024-04-08 21/week @ 2024-04-15 16/week @ 2024-04-22 9/week @ 2024-04-29 9/week @ 2024-05-06 45/week @ 2024-05-13 64/week @ 2024-05-20 71/week @ 2024-05-27 7/week @ 2024-06-03 2900/week @ 2024-06-10

3,043 downloads per month
Used in 4 crates

MIT license

150KB
3K SLoC

Agent

An agent library.

License

The source code is provided under the terms of the MIT license.


lib.rs:

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:

  1. Requests that end users send to services. Services may call other services too.
  2. Responses that services send back.
  3. 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:

  1. Broadcast that is being received by each of the subscribed agents.
  2. Multicast that is being received by only one agent of a SharedGroup of subscribers.
  3. Unicast that is intended for a specific agent.

Dependencies

~13–28MB
~511K SLoC