Re: Controlling Message generation based on ActiveMQ memory

2011-06-14 Thread Aneesh
@Torsten Mielke Ya that worked.. I obtained the 'brokerView' from the 'brokerService' instance using 'brokerView.getAdminView()' Then i used the 'brokerView.getMemoryPercentUsage()' which gave me the current memoru used buy the broker..I can now validate this percentage against a threshold value

Re: Controlling Message generation based on ActiveMQ memory

2011-06-06 Thread Torsten Mielke
Assuming you don't have many producers sending to the same destination, your producer could connect to the broker via JMX and query the MemoryPercentUsage property of the destination. If that is above 70% you might skip the creation of the msg. So JMX does expose this information. Other than that I

Re: Controlling Message generation based on ActiveMQ memory

2011-06-06 Thread Aneesh
Thanks a lot for sharing the link. I went through that and it seems all these end up at a point where the producer may slowdown processing or throw an exception (like ResourceAllocation Exception etc). But the scenario what i am trying to avoid is the unwanted processing of constructing the messag

Re: Controlling Message generation based on ActiveMQ memory

2011-06-06 Thread Norman Maurer
You can do this via flow-control. See: http://activemq.apache.org/producer-flow-control.html Bye, Norman Am 06.06.2011 15:23, schrieb Aneesh: Hi all, I have a java class which produces the message and puts the message into the queue. I have a requirement where i should stop producing the me