[rabbitmq-discuss] Java client notifications when basicPublish is throttled due to disk_free_limit
Matthias Radestock
matthias at rabbitmq.com
Tue Feb 19 21:20:49 GMT 2013
On 19/02/13 18:21, Joshua Crean wrote:
> Is there any way for the rabbit java client code to provide some type of
> notification when basicPublish is being throttled due to the
> disk_free_limit? Also, where do these un-published messages end up?
> We've tried to use rabbitmqctl to inspect the state of the
> queues/exchanges/channels, but the messages don't appear in any of these.
Throttling is behaviourally equivalent to network congestion. The
messages are buffered in the network, until those buffers fill up, at
which point the sender will block.
If, for example, connections were blocked due to lack of disk space and
the server suddenly regained some disk space then all the messages
published by clienta while connections were blocked will flow into the
server and be processed.
> We are concerned about the potential to lose messages that the java code
> thinks it published successfully.
So presumably you are not *just* concerned about connection blocking due
to disk space.
The general mechanism for dealing with potential message loss on
publishing is 'confirms'. Now, while connections are blocked, no
confirms for messages buffered in the network will be sent to clients.
But, as noted above, the messages aren't actually lost. Potential loss
will only occur when the connection gets terminated. At which point the
safe assumption on the publisher side is that any messages which hasn't
been confirmed may have been lost.
Matthias.
More information about the rabbitmq-discuss
mailing list