[rabbitmq-discuss] Publish-Confirm

cw storm cwstorm at gmail.com
Wed Feb 26 18:16:45 GMT 2014

I would like to use the example code provided in

I'm trying to understand the below snippet:

for (long i = 0; i < MSG_COUNT; ++i) {
     ch.basicPublish("", QUEUE_NAME, MessageProperties.PERSISTENT_BASIC,
while (unconfirmedSet.size() > 0)

As stated, "the producer waits for all the messages to be confirmed."
Assuming that's the above code.  Is the "while" logic safe?  What
happens when the "unconfirmedSet.size" is always greater than 0?
Also, the "MSG_COUNT" if set to 10000, does the for loop will always
loop 10000 times even though there might only be say 10 messages?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140226/b3764644/attachment.html>

More information about the rabbitmq-discuss mailing list