Creating JMS Queues at runtime [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 16:14:15

问题


I am working on an application where the app user can create / delete queues . Also , he would be able to move a message from 1 queue to another, delete a message , rearrange the messages in the queue based on some filter.

One possible design is to use activemq for queues and apache camel for various other operations having integrated with Grails. But I am not sure whether ActiveMQ allows creation /deleltion queues at runtime.
Would this be a good choice to implement such system?


回答1:


Also a bit information about AMQ and on demand creation of destinations http://activemq.apache.org/how-do-i-create-new-destinations.html




回答2:


Yes, you can create/delete/manage ActiveMQ queues at runtime. This can be done using ActiveMQ/Camel APIs or JMX APIs...

This article discusses the ActiveMQ JMX API approach in more detail...

http://www.consulting-notes.com/2010/08/monitoring-and-managing-activemq-with.html

You can use Camel's recipientList to route dynamically to endpoints (which can be new JMS queues, etc)...

http://camel.apache.org/recipient-list.html




回答3:


Any JMS client can use Session.createQueue() or Session.createTopic(). IIRC, these will be temporary by default, meaning that they'll disappear once the particular session is closed.

You should also read the ActiveMQConnection JavaDoc, which gives you many options for creating temporary or durable destinations (queues and/or topics).



来源:https://stackoverflow.com/questions/2529091/creating-jms-queues-at-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!