activemq

Delete specific queue when client's idle time in activemq

本秂侑毒 提交于 2019-12-11 01:25:55
问题 I want to delete a specific queue when consumer's down time in activemq. I don't want to send queue message when consumer available time.Give me some suggestions.Thanks in advance. This is my publisher class public class MessageHandler implements MessageListener { private static String url = "tcp://localhost:61616"; private Session session; private MessageProducer producer; private MessageConsumer consumer; private Connection connection; private Map<String, String> messageStatus = new HashMap

How to create exclusive queue consumer in Mule?

点点圈 提交于 2019-12-11 01:16:40
问题 In ActiveMQ you configure an exclusive consumer for a queue like: Queue_Name_Here?consumer.exclusive=true How to configure an exclusive consumer like above in Mule? 回答1: You need to URL encode the queue name, as Mule might try to decode the parameters as Mule transport options, which they are not. <jms:inbound-endpoint queue="Queue_Name_Here%3Fconsumer.exclusive%3Dtrue" connector-ref="Active_MQ" doc:name="JMS"/> 回答2: I was using a jms:activemq-xa-connector for distributed transactions and

Transport scheme NOT recognized: [amqp]

隐身守侯 提交于 2019-12-11 01:15:59
问题 Am trying to use AMQP with ActiveMQ and am getting the following error Transport scheme NOT recognized: [amqp] This is my code ConnectionFactory connectionFactory = new ActiveMQConnectionFactory( "amqp://localhost:61616"); Connection connection = null; try { connection = connectionFactory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Queue queue = session.createQueue("somequeue"); MessageProducer producer = session

Failover support for activemq REST api

ぃ、小莉子 提交于 2019-12-11 00:42:17
问题 I am using activemq using a custom message servlet through REST api. For message retrieval url typically looks like "http://localhost:8161/MessageServlet/MessageServlet?destination=queue://test.queue&clientId=Tester". I am trying incorporate failover mechanism using pure master slave mode("http://activemq.apache.org/pure-master-slave.html"). I have already configured my master slave and it is running using jms connection. My question is, what should be my failover url look like when i am

ActiveMQ - CreateSession failover timeout after a connection is resumed

梦想与她 提交于 2019-12-11 00:38:43
问题 I'm using ActiveMQ 5.6.0 and ActiveMQ NMS client. I connect to the broker using the follow code: var connectionFactory = new ConnectionFactory( "failover:(tcp://localhost:61616)?transport.timeout=5000" ); connection = connectionFactory.CreateConnection(); connection.Start(); connection.ConnectionResumedListener += OnConnectionResumed; Then I stop the broker and start it again. After that in the method OnConnectionResumed private void OnConnectionResumed() { var session = connection

ActiveMQ connections/sessions in PooledConnectionFactory pool not used with failover: uri

﹥>﹥吖頭↗ 提交于 2019-12-11 00:21:32
问题 I have a 2 broker cluster on AMQ 5.12.0 that I’m sending messages through from a Tomcat 8 web app. I have the following Camel (2.15.2) / Spring (4.2.1) config. which I’m using to configure an AMQ PooledConnectionFactory. <camel:camelContext id="camel-client"> <camel:template id="camelTemplate"/> </camel:camelContext> <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="failover:(tcp://dev2.wtgroupllc.com:61626?keepAlive=true

logstash Input painfully slow while fetching messages from activemq topic

我的梦境 提交于 2019-12-10 22:59:51
问题 I have configured JMS input in logstash to subscribe to JMS topic messages and push messages to elastic search. input { jms { id => "my_first_jms" yaml_file => "D:\softwares\logstash-6.4.0\config\jms-amq.yml" yaml_section => "dev" use_jms_timestamp => true pub_sub => true destination => "mytopic" # threads => 50 } } filter { json{ source => "message" } } output { stdout { codec => json } elasticsearch { hosts => ['http://localhost:9401'] index => "jmsindex" } } System specs: RAM: 16 GB Type:

ActiveMQ embedded broker, exception in shutdown hook

半腔热情 提交于 2019-12-10 21:42:09
问题 I get the following error on shutdown, using an embedded broker: Exception in thread "ActiveMQ ShutdownHook" java.lang.NoClassDefFoundError: org/apache/activemq/broker/BrokerService Have I misconfigured something possibly? I used the config spelled out on the activemq page here: http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html (the configuration labeled "using spring-2.0" at the bottom). The messages are being delivered properly etc. so I'm not sure if this error is

Wildfly 10 Final indefinitely creating ActiveMQ-client-global-threads

*爱你&永不变心* 提交于 2019-12-10 21:25:16
问题 I have a Wildfly AS setup for JMS, I;m monitoring it with Jconsole and have noticed that before I even create a session on my Consumer or Producer the thread count is steadily increasing, I was previously using Wildfly 9 final for the same purpose, it's thread usage was steady even during use, but it had a memory leak which prompted me to upgrade. In Jconsole I can see: Thread-2(ActiveMQ-client-global-threads-3258368) Thread-4(ActiveMQ-client-global-threads-3258368) Thread-5(ActiveMQ-client

Integrating existing tomcat server with Active MQ?

吃可爱长大的小学妹 提交于 2019-12-10 21:22:09
问题 I am using tomcat as webserver. Planning to use active mq for messaging purpose. Just started learning about jms and activeMQ. Gone thru https://activemq.apache.org/getting-started.html. What i have got is active mq comes with its own web server(probably apache IS not sure). My question is what if I want to use existing tomcat server instead of installing new server for active mq. Is it possible? UPDATE: i think i can itegrate existing tomcat with https://activemq.apache.org/tomcat.html 回答1: