I’m invoking:
GetResponse response = channel.basicGet("some.queue", false); // no auto-ack
....
channel.basicAck(deliveryTag, ...);
However, when I invoke basicGet, the messages in the queue stay in “Ready”, rather than in “Unacknowledged”. I want them to be in unacknowledged, so that I can either basic.ack them (thus discarding them from the queue), or basic.nack them
When doing
ackimmediately after thegetit works fine. However, in my case, they were separated by a request. And spring’s template closes the channel and connection on each execution. So there are three options:In the former two cases you can’t do it with spring’s
RabbitTemplate