activemq

create list of activemq queue

匆匆过客 提交于 2019-12-14 03:48:48
问题 my existing code which uses BlockingQueue creates a list of BlockingQueue (like private List> queues;) in which I can put messages to process. However due to persistence issue we plan to shift to activemq. Can anyone please help me if we can get a list of activemq queue (in java program not from configuration file). I know that I can use createQueue on session to create a single instance of the queue but I want list of queue like done for BlockingQueue. Any help would be much appreciated. 回答1

ActiveMQ: How to create subscriber for ActiveMQ.Advisory.Connection topic

╄→гoц情女王★ 提交于 2019-12-14 03:31:29
问题 I am writing the alerts for ActiveMQ version 5.4.3 for different event like client connected or disconnected. But I am not able to proceed and not able to create the subscriber for ActiveMQ.Advisory.Connection topic it is throwing exception: Exception in thread "main" javax.jms.JMSException: Cannot create a durable subscription for an advisory Topic Any help in this would be appreciated. Thanks Jay 回答1: You aren't allowed to create durable subscriptions for Advisory topics, exactly what the

ActiveMQ via REST: High throughput Jetty configuration

我只是一个虾纸丫 提交于 2019-12-14 03:14:07
问题 i want to send Messages to ActiveMQ via HTTP Requests. I created my own Servlet (the default servlet isn't that good). Unfortunately my Server only handles 400 Requests per second. Is there a configuration i have to do so jetty can handle more? I'm running on an 8 core maschine so more requests should not be a problem. 回答1: Two suggestions: Did you configure the jetty thread pool high enough to concurrently handle your requests? Or is the CPU utilization of the JVM at 100% at runtime? If yes,

Understanding JMS integration testing with Spring SingleConnectionFactory and CachingConnectionFactory

大兔子大兔子 提交于 2019-12-14 02:40:00
问题 Please some help understanding the following: I am using CachingConnectionFactory in my app and first used it during my jms tests to test my jms config like guaranteed delivery, rollback/commit, etc.. I am using Spring's JmsTemplate for sending and DefaultMessageListenerContainer during delivery. I noticed that this is hard/impossible when using several test methods run sequential Example: in test method A I throw exceptions in the Message listener (consumer side) such that retries occur.

JmsTemplate - define concurrency per queue?

a 夏天 提交于 2019-12-13 19:24:42
问题 So far i've only been able to find concurrency setting in the jms connection factory: <jms:listener-container connection-factory="myConnectionFactory" task-executor="myTaskExecutor" destination-resolver="myDestinationResolver" transaction-manager="myTransactionManager" concurrency="10"> Is it possible to configure the number of consumers for a single queue? i.e something like: <jms:listener destination="playerStatsQueue" ref="playerStatsService" method="onMessage" concurrency="100" /> Thanks!

Transport Listener and ActiveMq restart

浪尽此生 提交于 2019-12-13 19:02:33
问题 I develope JMS application and now I want to add feature that will support broker restart. I have dynamic topics and I should recreate them after my connection will be resumed. Also I should have a possibility to know when broker is down and when it come back. So I try to implement this feature using ActiveMQ failover protocol. I implement TransportListener and in the method "transportInterrupted" I call full disconnect like public void disconnect() throws JMSException { System.out.println("!

What solution should I use for this webapp with websockets. ActiveMQ?

大憨熊 提交于 2019-12-13 15:25:43
问题 I'm currently in the middle of developing a webapplication which needs a websocket connection to receive notifications of events from the server. The clients are separated in groups and all the clients in a group must receive the same event notifications. I thought that ActiveMQ could probably support this model, using different queues for each group of clients. It would also be relatively easy to push events to ActiveMQ using stomp, and then use stomp-over-websockets for the clients. The

ActiveMq - Kaha - Store is locked… waiting 10 seconds for the Store to be unlocked

别说谁变了你拦得住时间么 提交于 2019-12-13 14:28:48
问题 I have two queues on my application (Spring3-Hibernate-ActiveMq). Thanks for your comments in advance. I would be glad if you help me avoid the following error: 10:02:41,541 INFO KahaStore:463 - Kaha Store using data directory \tmp\kahadb 10:02:41,542 INFO KahaPersistenceAdapter:185 - Store is locked... waiting 10 seconds for the Store to be unlocked. 10:02:51,542 INFO KahaStore:463 - Kaha Store using data directory \tmp\kahadb 10:02:51,543 INFO KahaPersistenceAdapter:185 - Store is locked...

JMS topic time to live

与世无争的帅哥 提交于 2019-12-13 13:05:30
问题 I'm working on an application consisting of some modules. In one of those module someone created a topic producer that publishes messages on a topic, but this module hasn't a topic consumer to dequeue the messages. The topic producer sets the time-to-live property to 300000 milliseconds using setTimeToLive() . I expect that if there is no consumer, the messages expire within 300000 milliseconds and they are deallocated. The application is deployed on Tomcat 6.0.36 and it uses an external

Spring Boot WebSocket with embedded ActiveMQ Broker

[亡魂溺海] 提交于 2019-12-13 12:23:09
问题 I tried to change an web application from simple broker to an embedded ActiveMq Broker with stomp using Spring boot 1.5.4 but always getting an error on start up Caused by: java.lang.IllegalArgumentException: No handlers at org.springframework.util.Assert.isTrue(Assert.java:92) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.start(SubProtocolWebSocketHandler.java:244) ~[spring-websocket-4.3.9.RELEASE.jar:4.3.9.RELEASE] at