Am currently developing an application with mosquitto and activemq.
one device will publish the message to mosquitto and forward that to activemq and publish the message. there are multiple subscribers for activemq.
so am using mosquitto bridge. but it's not working below is the code.both mosquitto and active may exists in the same machine also.
connection testmq
bridge_insecure false
address localhost:1893
cleansession false
clientid 1
start_type automatic
username system
password manager
notifications false
try_private true
topic dev1 in 2 owntracks/ac/ owntracks/ac/
topic dev2 out 2 owntracks/mq/ owntracks/mq/
Please provide me any suggestions
Try to add
bridge_protocol_version mqttv311
to your mosquitto configuration. It helped me to setup a basic connection between mosquitto and AMQ.
It would be much better if you added some more information about your issue. Just "not working" is not enough. Do you have any informative messages about the connection state either in AMQ or mosquitto log?
Related
I have a requirement to create a bridge between a Queue in ActiveMQ and a Queue in Solace. When ever there is a message in ActiveMQ Queue it should automatically get transferred to SolaceQ.
I'm struggling to find the steps for this configuration. I have ActiveMQ installed on my local machine. Request you to please throw some light on this.
FYI: I'm very new to ActiveMQ/Solace
I think you'll need to do this via JMS since both ActiveMQ and Solace support it. Check out ActiveMQ's docs here: https://activemq.apache.org/jms-to-jms-bridge
I have a setup with two MQTT Brokers (Mosquitto), remote and local.
Remote handles a lot of traffic, local is supposed to act as a bridge and only forward a small subset of remote's topics.
So far, this is my mosquitto.conf for broker local:
connection bridge
address remote.com
notifications false
topic test/1 in 0
From what I understood, that configuration would make the local broker connect to remote and only subscribe to test/1.
Still, when subscribing to '#' of local broker, all of remotes messages arrive through local, not only test/1.
Is there any way to make my bridge forward only one certain topic or topic tree from the broker remote?
As #Brits kindly explained in his comment, all the topics were coming through since on my first bridge attempt, I used '#' as the pattern.
That pattern seems to have persistet in all subsequent connections, until I used cleansession true once.
Thanks for the help.
I am very new to ActiveMQ and I try to understand if I can achieve the following:
I have a producer which publishes messages to broker 1. In a secure network there is a broker 2 and the receiver. The connection between broker 1 and broker 2 can only be in the direction from broker 2 towards broker 1, because I can only communicate out of the secure network, but not in it.
All the documentation about network of brokers just show the way depicted in the following picture (found on https://dzone.com/articles/active-mq-network-brokers)
I need something similar, but the connection should be from broker-2 to broker-1.
Is something like this possible? Maybe with a polling from broker-2 to broker-1
Yes. Have Broker2 connect to Broker1 and establish a duplex connection
<networkConnector uri="static:(tcp://broker1:61616)" duplex="true" ... >
see: Network of Brokers
I am trying to connect to a RabbitMQ remote machine to read queue messages and currently I am using port 5672 which is sending the auth message over plain text so I need to get it working on port 5671 but it's failing.
Does it require anymore configuration then just changing the port number below?
I am using the nodeJS plugin for ampq-callback to connect
amqp.connect('amqp://xxx:5671', function(err,conn) {
https://www.rabbitmq.com/ssl.html
https://www.rabbitmq.com/troubleshooting-ssl.html
Yes, you must set up TLS in RabbitMQ.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
I am new to Stomp ActiveMQ. I want to create a login from an android client and I don't know how to use ActiveMq. I\ve installed active mq, configured stomp and run the stompexample.
1. I have an error when running activemq from command line if I add in in the activemq.xml the following line:
<transportConnector name="stomp+nio" uri="stomp+nio://localhost:61612"/>
<transportConnector name="stomp+ssl" uri="stomp+ssl://localhost:61612"/>
Can someone please explain what is with tx1 and tx2? Is there a way to send on the queue a message to a specific client? how?
connection.connect("system", "manager");
connection.begin("tx1");
connection.send("/queue/test", "message1");
connection.send("/queue/test", "message2");
connection.commit("tx1");
connection.subscribe("/queue/test", Subscribe.AckModeValues.CLIENT);
connection.begin("tx2");
StompFrame message = connection.receive();
System.out.println(message.getBody());
connection.ack(message, "tx2");
message = connection.receive();
System.out.println(message.getBody());
connection.ack(message, "tx2");
connection.commit("tx2");
connection.disconnect();
Can someone please tell me how to create an application that sends on a queue a text containing username, password and receives an answer if the register was successful?
You need to configure the transport connectors with different port numbers, they can't both share port 61612. Your configure is create a Stomp NIO connector and a different Stomp SSL Connector.
You can't send messages to a distinct client, you just place them on a Queue and if there is a client subscribed it will get the message, that's the nature of Queue based messaging. The TX1 TX2 stuff is sending the messages within a transaction.
Recommend you take some time to read up of JMS Messaging, the Stomp spec and some other messaging based tutorials.