activemq

ActiveMQ Exception when trying to work with SSL

岁酱吖の 提交于 2019-12-11 08:15:05
问题 I'm trying to send secure messages over SSL with ActiveMQ, using the Apache NMS API for .NET. In the broker.xml I tried adding "sslEnabled=true" to the default acceptor: <acceptor name="artemis">tcp://0.0.0.0:61616?sslEnabled=true;tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300</acceptor> I'm trying to set up a consumer like this: IConnectionFactory factory = new ConnectionFactory(

Best way to display dynamic data in a webpage

你离开我真会死。 提交于 2019-12-11 08:06:30
问题 My goal is to visualize the incoming data stream on a browser. I have used activemq to queue the stream. A single message consumed from the queue looks like this: "int,date/time,int,string". I have to update my line graph on the browser (every 100ms). Any ideas? 回答1: It sounds like a use case for WebSocket. There are many ways to implement it, but a rather nice blog post on the topic is presented here. Another way is to use MQTT directly from the browser using javascript and subscribe to a

Mac Daemon for ActiveMQ

泄露秘密 提交于 2019-12-11 07:56:08
问题 I have tried setting ActiveMQ daemon but have been unsuccessful so far. I can't seem to load ActiveMQ . Not sure what more can I do to make this work? I can start ActiveMQ by running command /Library/ActiveMQ/bin/macosx/activemq start In the plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>Label<

ActiveMQ delete specific message

北城余情 提交于 2019-12-11 07:45:25
问题 I use the following code to recieve messages without deletion. Now I need to add some filtering and delete some of the messages. My question is how to delete a specific message while other messages should stay in the queue? Uri connecturi = new Uri("activemq:tcp://model.net:61616"); IConnectionFactory factory = new NMSConnectionFactory(connecturi); List<ModelBuilderBase> result = new List<ModelBuilderBase>(); using (IConnection connection = factory.CreateConnection()) using (ISession session

Acknowledgement from Consumer in ActiveMQ

百般思念 提交于 2019-12-11 07:38:17
问题 I am writing a Java application using ActiveMQ. I have a Producer Class (which takes user input) and a Consumer Class with a listener, so that as soon as messages arrive, Message Listener executes the onMessage(msg) function. My question, though, is when does a consumer sends back the acknowledgement to the broker, so that the msg is de-queued from the broker? Is it after completing the actions written in the onMessage(msg) function or is it just when the onMessage(msg) function is invoked?

Detect change in Consumers of an ActiveMQ topic

删除回忆录丶 提交于 2019-12-11 06:58:57
问题 I have a cluster of tomcats which consume messages from an ActiveMQ topic. Now, if one of the tomcat in the cluster goes down then i am guessing that number of consumers would go down by 1. Now, i would like to detect that change using some callback or listener on that topic. Is that feasible ? Will something like : Region.getDestinations(ActiveMQDestination) work ? 回答1: Advisory Message is what you need. each time you got a message with this code this means you have consumer starting or

Checking ActiveMQ queue is empty from JMeter

我怕爱的太早我们不能终老 提交于 2019-12-11 06:25:57
问题 I am running a performance test using JMeter for our application and the there is some asynchronous processing in the form of events on an ActiveMQ queue. I want to wait for the ActiveMQ queue to be empty before recording the statistics for my test. Is there a good way to do that? I have explored the JMS Producer/Consumers in JMeter 2.10 but they consume messages off the queue which is not what I want as it modifies the original flow of the application. Is there a way to monitor the draining

Apache Camel - JMS inonly behaviour when broker down

一笑奈何 提交于 2019-12-11 05:48:45
问题 I am producing to an ActiveMQ instance with a Camel ActiveMQ component: <camel:log message="YMA_IN" /> <camel:inOnly uri="activemqBroker:queue:queue.test" id="activemqBrokerTestQueue"/> <camel:log message="YMA_OUT" /> The only jms configuration on the endpoint is TTL and a pooled connection factory. <amq:connectionFactory id="jmsConnectionFactory" brokerURL="${config.jms.broker.url}" /> <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" init-method=

ActiveMQ memory limit exceeded

放肆的年华 提交于 2019-12-11 05:26:27
问题 I try to configure ActiveMQ for the following behavior: when broker exceeds its memory limit, it should store message in persistence storage. If use the following configuration: BrokerService broker = new BrokerService(); broker.setBrokerName("activemq"); KahaDBPersistenceAdapter persistence = new KahaDBPersistenceAdapter(); persistence.setDirectory(new File(config.getProperty("amq.persistenceDir", "amq"))); broker.setPersistenceAdapter(persistence); broker.setVmConnectorURI(new URI("vm:/

jmx doesnt seem to be working with activeMQ

我与影子孤独终老i 提交于 2019-12-11 05:16:30
问题 I'm trying to use JMX with activeMQ for monitoring so far I've been using this and this as a reference but so far I'm unable to connect to jmx remotely and also I don't see any mention of jmx url in activemq logs. I'm wondering if there is another way to make sure jmx is working? is it supposed to be indicated in activemq logs? PS I'm using jdk1.7 and activeMQ 5.14.2. Thanks in advance! EDIT I set useJmx="true" in my activemq.xml file: <broker xmlns="http://activemq.apache.org/schema/core"