38 releases (13 breaking)

✓ Uses Rust 2018 edition

0.14.0 Jun 4, 2020
0.12.1 Apr 24, 2020
0.11.2 Mar 3, 2020
0.10.0 Dec 20, 2019
0.3.1 Mar 5, 2019

#185 in Network programming

Download history 262/week @ 2020-03-14 374/week @ 2020-03-21 165/week @ 2020-03-28 173/week @ 2020-04-04 334/week @ 2020-04-11 191/week @ 2020-04-18 91/week @ 2020-04-25 63/week @ 2020-05-02 139/week @ 2020-05-09 241/week @ 2020-05-16 199/week @ 2020-05-23 352/week @ 2020-05-30 118/week @ 2020-06-06 87/week @ 2020-06-13 20/week @ 2020-06-20 59/week @ 2020-06-27

915 downloads per month
Used in svc-error

MIT license

135KB
2.5K SLoC

Agent

Build Status

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

~14MB
~340K SLoC