Mcast communication method
flowchart LR
A[Producer] --> H[HTTP Relay]
H[HTTP Relay] --> B[Consumer 1]
H[HTTP Relay] --> C[Consumer 2]
H[HTTP Relay] --> D[Consumer ...]
Mcast
provides buffered and asynchronous one-to-many (producer -> many consumers) communication method.
A producer sends data which latter can be retrieved by multiple consumers.
Data packets are kept in sequence and consumers retrieve it in the right order.
Communication Sequence Diagram
The producer is sending two messages to the consumers.
sequenceDiagram
participant A as Producer
participant H as HTTP Relay Server
participant B as Consumer 1
participant C as Consumer 2
par Sending first data packet
A->>H: POST mcast/mychan
Note left of H: Request body: "My first message"
H->>A:
and
B->>H: GET mcast/mychan
and
C->>H: GET mcast/mychan
end
par Retrieving first and sending second data packet
H->>B: Response body: "My first message"
B->>H: GET mcast/mychan
and
H->>C: Response body: "My first message"
C->>H: GET mcast/mychan
and
A->>H: POST mcast/mychan
Note left of H: Request body: "My second message"
H->>A:
end
par Retrieving second data packet
H->>B: Response body: "My second message"
and
H->>C: Response body: "My second message"
end
par - block parts are parallel and can happen in any order.