Observability in messaging scenarios
In Chapter 10, Tracing Network Calls, we just started scratching the surface of tracing support for asynchronous processing. There, we saw how the client and server can send a stream of potentially independent messages to each other.
In the case of messaging, things get even more complicated: in addition to asynchronous communication, the producer and consumer interact through an intermediary – a messaging broker.
Operation on the producer completes once the message is published to the broker without waiting for the consumer to process this message. Depending on the scenario and application health, the consumer may process it right away, in a few seconds, or in several days.
In some cases, producers get a notification that the message was processed, but this usually happens through another messaging queue or a different communication channel.
Essentially, the producer does not know whether the consumer exists – failures...