开发者

how can I configure an activemq queue to make it not accepting messages?

I am an activeMQ newbie. Is it possible to add something to the activeMQ xml configuration to force a queue to stop accepti开发者_开发百科ng messages when (for example) 100 messages are already in a specific queue?


ActiveMQ expose the queue size with JMX, so i guess you can use that information to limit the queue size. see: Queue size thread


Take a look at Producer Flow Control http://activemq.apache.org/producer-flow-control.html

It limits your queue on the amount of memory the queue takes


Depending on your requirements, you may want to consider configuring a pending message limit strategy or a message eviction policy:

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

These two options are mainly for use in a slow consumer situation to work with the consumer's prefetch buffer. But I'm suggesting them to you because I don't understand the full context of your question or know your requirements.

Bruce

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜