activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rabidgremlin <rabidgrem...@gmail.com>
Subject Re: Help ! - Broker Hanging up
Date Thu, 08 Mar 2007 01:15:33 GMT
After digging around I found this link:

http://activemq.apache.org/slow-consumer-handling.html

Since I don't mind if I lose messages (they have a 30 sec lifespan anyway)
it looks like I could set up a ConstantPendingMessageLimitStrategy to throw
away messagse so I don't block.

Should this work ?

I tried the following bit of code but it did not seem to make any difference
(I suspect it is not correct):

  broker = new BrokerService();

  // no JMX or persistence needed
  broker.setUseJmx(false);
  broker.setPersistent(false);

  ConstantPendingMessageLimitStrategy strat = new
ConstantPendingMessageLimitStrategy();
  strat.setLimit(50);

  PolicyEntry polEntry = new PolicyEntry();
  polEntry.setPendingMessageLimitStrategy(strat);

  PolicyMap policyMap = new PolicyMap();
  policyMap.setDefaultEntry(polEntry);

  broker.setDestinationPolicy(policyMap);

Jonathan

On 3/7/07, Hiram Chirino <hiram@hiramchirino.com> wrote:
>
> In the next major version (trunk branch) we have made some major
> strides in this area so that messages just go to disk on your senario
> instead of being buffered in memory.  But all buffers (even ones on
> disks) have limits and will eventually be reached.  So you have to
> detect dead clients anyways to avoid running out of disk space.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message