| Log Message: |
r234@34: chirino | 2007-02-23 14:47:41 -0500
When a message send blocks on a destination level usage manager, it blocks all publishers on the same connection even publishers that are publishing to destinations who's limits have not been reached. In some scenarios, this can result in a deadlock since it prevents publishing to a destination that could otherwise receive messages.
This patch delays sending the repsone to sync publishers until the destination usage allows the message to be sent but does not block on the send. This allows other producers on the same connection to get serviced but flow controls the producers on full destinations by delaying the send response.
In order to take advantage of this new producer flow control which avoid the described deadlock, sync sends must be used. To force sync sends for all send requests, a new 'useSyncSend' option should be set to true on the ActiveMQConnectionFactory.
Hopefully a future version this patch will be developed that provides the same feaure but works with async sends and a producer ack to flow control the producer.
|