[CONF] Apache ActiveMQ > Producer Flow Control

2017-10-25 Thread Gary Tully (Confluence)
Title: Message Title



 
 
 
 
 
 
 

Gary Tully edited a page 
 
 
  
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Producer Flow Control 
 
 
  
 
 
 
 
 
 
 ... The timeout is defined in milliseconds so the example above waits for three seconds before failing the send() operation with an exception to the client-side. The advantage of this property is that it will block for the configured amount of time instead of failing immediately or blocking indefinitely. This property offers not only an improvement on the broker-side, but also an improvement for the client so it can catch the exception, wait a bit and retry the send() operation.  Starting in version 5.16.0 the sendFailIfNoSpace and sendFailIfNoSpaceAfterTimeout can be configured on a per destination basis via destination policies.  Disabling Flow Control A common requirement is to disable flow control so that message dispatching continues until all available disk is used up by pending messages (whether persistent or non persistent messaging is configured). To do this enable Message Cursors. ...  
 
 
  
 
 
 
 
 
 
 
 
 
 

View page
• 
 
 
 
 
 
 

Like 
 
 
  
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
Stop watching space
• 
 
 
 
 
 
 
Manage notifications 
 
 
 
 
 
 
 
 
 
 
  
 
 
This message was sent by Atlassian Confluence 5.8.17  
 
 
  
 
 
 
 
 
 
 
 
 




[CONF] Apache ActiveMQ Producer Flow Control

2014-03-19 Thread Timothy Bish (Confluence)














  


Timothy Bish edited the page:
 


Producer Flow Control   






...

Producers that use Async Sends - generally speaking, producers of non-persistent messages - don't bother waiting for any acknowledgement from the broker; so, if a memory limit has been exceeded, you will not get notfied. If you do want to be aware of broker limits being exceeded, you will need to configure the ProducerWindowSize connection option so that even async messages are flow controlled per producer.




 Code Block




 

ActiveMQConnectionFactory connctionFactory = ...
connctionFactory.setProducerWindowSize(1024000);
 



...
If you like, you can disable flow control for specific JMS queues and topics on the broker by setting the producerFlowControl flag to false on the appropriate destination policy in the Broker configuration - e.g.



 Code Block









xml


 




 

destinationPolicy
  policyMap
policyEntries
  policyEntry topic=FOO. producerFlowControl=false/
/policyEntries
  /policyMap
/destinationPolicy
 



...
Note that, since the introduction of the new file cursor in ActiveMQ 5.x, non-persisted messages are shunted into the temporary file store to reduce the amount of memory used for non-persistent messaging. As a result, you may find that a