Hi, I have a problem. I have a client that have to publish some messages on a topic and I have to close (or pause) the connection when all the messages are delivered. (I have to close the connection as soon as possible, due to synchronization with a measure task). How could I get the status of messages in order to close the connection when all messages are published to topic?
You could use a request-response pattern.
I.e. send a response back once you have consumed the message from the topic.
This is a classic pattern, google it for more info.