activemq

ActiveMQ: Intercept publishing to a certain topic

痴心易碎 提交于 2019-12-11 05:09:16
问题 I'm setting up an ActiveMQ broker with MQTT that uses an external service for user authentication. I figured out how to write a BrokerFilter and plug it into a broker, so the basics are covered. I could even limit users in the topics they are allowed to subscribe on using the addConsumer() override. That method looks like this, and works: override fun addConsumer(context: ConnectionContext?, info: ConsumerInfo?): Subscription { // let connections from the local vm through return if

ActiveMQ scheduler message in spring

余生长醉 提交于 2019-12-11 04:37:48
问题 1.under below configuration, scheduler messages are received immediately. 2.if removing the annotation @Profile("embedded") of brokerService() ,it will throw a java.net.BindException: Address already in use: JVM_Bind exception . @Configuration @EnableJms public class MessageConfig { private static final String DEFAULT_BROKER_URL = "tcp://localhost:61616"; public static final String DESTINATION_FB = "fb"; private static final String USER_NAME = "admin"; private static final String USER

JMSListener - dynamic selector

泪湿孤枕 提交于 2019-12-11 04:24:27
问题 I currently have a JMSListener as shown below. It uses a selector of a value in a properties file. This works fine. @JmsListener(destination = "myQueueDest", selector = MyHeaders.SELECTOR_KEY + " = '${myapp.selector_val}'") private void consumeData(MyCustomObj mycustomObj) { } I have a need now to use a dynamic selector with a value in memory, rather than the spring property. Is there a way to use JMSListener (or some other listener mechnaism) to do a selection off the ActiveMQ queue? Update:

Push Message from ActiveMQ to Spring Controller

时间秒杀一切 提交于 2019-12-11 03:55:22
问题 I'm using Spring MVC, ActiveMQ and WebSocket(via sock.js and stomp.js ) to build a real-time data delivery application. As we know, when a producer(another desktop application) push a message to ActiveMQ, and the onMessage() method will catch it. public class MessageReceiver implements MessageListener { public void onMessage(Message message) { System.out.println(message); // How to push the message to a Controller in Spring? } } Most of the tutorials just print the message to the console. I

Make sure the broker holds messages until at least one consumer gets it

大兔子大兔子 提交于 2019-12-11 02:57:56
问题 I am begining to implement an ActiveMQ based messaging service to send worker tasks to various servers, however I am noticing that in the default mode, if no one is "listening" to a producer's topic, any message from that producer will be lost. I.e., If Producer Senders Message with a live broker But No Consumer is there to listen Message goes no where I would like instead for the Broker to hold on to messages until at least one listener receives it. I am trying a couple ways of implementing

Starting ActiveMQ message listener in Tomcat?

痴心易碎 提交于 2019-12-11 02:56:52
问题 I've created an ActiveMQ MessageListener and configured it using Spring. I'm hosting the listener in Tomcat. When I start up the web application (that features only the listener), should the listener automatically start? Or do I need additional configuration? Here's what I have. First, updated the web.xml to allow spring to configure itself on startup, <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001

ActiveMQ Web console using LDAP Active Directory authentication

你说的曾经没有我的故事 提交于 2019-12-11 02:55:56
问题 Struggling to get ActiveMQ web console to use LDAP and authenticated against Active Directory. No errors when starting MQ, username/password login box prompt appears but doesn't progress when inserting the correct credentials. Version 5.15.6 login.config amqLdapLoginModule { org.eclipse.jetty.jaas.spi.LdapLoginModule required debug="true" contextFactory="com.sun.jndi.ldap.LdapCtxFactory" hostname="ad-server1.domain.com" port="389" bindDn="CN=readonly-user,OU=Accounts,DC=domain,DC=com"

Install ActiveMq in Apache Karaf 4.0.0.M2

泄露秘密 提交于 2019-12-11 02:39:15
问题 I'm trying to Install ActiveMQ in Karaf 4.0.0M2. But it always fails with an error. Please see console below. Please help me to resolve this problem. karaf@root()> feature:install jms karaf@root()> feature:repo-add activemq Adding feature url mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features karaf@root()> feature:install activemq-broker Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=activemq-web-console ; type=karaf.feature;

Communicating with AMQP 1.0 broker over SSL using Qpid

做~自己de王妃 提交于 2019-12-11 02:28:39
问题 I am using ActiveMQ 5.8.0, which supports AMQP 1.0 as a queue broker. I am trying to communicate with this from a Java client using the Qpid AMQP1.0 client jms library but do not see a method of specifying keystore and truststore information. I have successfully configured a client by passing in the SSL credentials via the Java VM options (e.g. -Djavax.net.ssl.keyStore), however this is not an acceptable method for my final solution... I need to be able to specify this information from within

ActiveMQ remote connections refused despite 0.0.0.0 in broker URL

与世无争的帅哥 提交于 2019-12-11 01:31:41
问题 I have an ActiveMQ v5.7.0 broker, running in Karaf v2.3.3, that I want to enable for remote connections. I've set the broker URL to 0.0.0.0:61616, to enable it to listen to network traffic. I've opened the firewall to allow the traffic from the client machines. However, all remote connections are being refused. A quick netstat seems to tell me that the broker isn't listening outside of localhost. jeremy@server:~$ netstat -pan | grep 61616 tcp6 0 0 127.0.0.1:61616 :::* LISTEN - Looking at the