aeron

In a unicast flow (publisher and subscriber on different machines) in Aeron messaging what happens if the subscriber goes down


If a publisher tried to offer a message, and the response code is -1, it means there are no connected subscriptions.

a) how does the publisher keep track of subscriptions? For instance the subscription may have been connected at one point. But it went down briefly. So in this case, when the offer call comes in, how does aeron know about the subscription going down?

The offer call is just appending to the log buffer, so at this point it wouldnt necessarily have to connect to the subscriber. As long as the message can be appended, why is a -ve response code being returned? cant we buffer the message and try to send it later


Solution

  • Aeron can track remote receivers on the network with its transport protocol using status messages.

    https://github.com/real-logic/aeron/wiki/Transport-Protocol-Specification

    A receiver that has gone away gracefully can indicate this without a timeout by sending a status message with the EOS bit set.

    Back pressure is a fundamental concept in communication which, unfortunately, many messaging systems do not surface as a first class concept. Aeron makes back pressure a first class concept at all levels of its design. Therefore negative value are returned on publication offer if there is no available buffering indicated by local or remote flow control.