In this example we will show how to use the explicit acknowledgment, the so-called
ack, while consuming messages.
A message is stored in a queue until one consumer gets the message and sends the
ack back to the broker.
ack can be either implicit or explicit. In the previous examples we have used theimplicit
In order to view this example in action, you can run the publisher from the Producing messages recipe and the consumer who gets the message, which you can find in the book archive at
To use this recipe we need to set up the Java development environment as indicated in the Introduction section.
In order to guarantee that the messages have been acknowledged ...