Consume messages from queue thru topic subscriptions
We have a publisher publishing messages to topics which are then spooled in a durable queue [endpoint] for guaranteed delivery, with several topic subscriptions for various subscribers.
In our tests, the subscriber application acknowledgements do not seem to have any effect on the messages persisted in the queue; only a message TTL causes a message to expire and be removed from the queue.
Do subscriber application acknowledgements after receiving a message thru the topic subscriptions result in the message being removed from the queue, or are they only used for guaranteed delivery (so the broker can resend the message to an online subscriber if no acknowledgement was provided by them)?
In P2P, that would make sense where clients would consume messages off of the queue, but in a pub-sub setup like this, when are the messages removed from the queue, if ever — after all of the online subscribers have acknowledged receipt, or are the messages only removed if a TTL is set on the message and enabled on the broker?