I have created a core bridge in ActiveMQ Artemis to send data from my local Artemis server to a remote Artemis server.
When I'm trying to send messages to remote server no error is happening, but no data will be send to the remote server.
Just after I stop my local server and restart it, I can see data in remote server.
In the other words, I can the message will be stored in remote server just after restarting local Artemis server.
<connectors>
<!-- Connector to the other node -->
<connector name="remote-connector">tcp://192.168.100.33:61616</connector>
</connectors>
<bridges>
<bridge name="my-bridge">
<queue-name>jms.queue.naja</queue-name>
<forwarding-address>jms.queue.naja.dest</forwarding-address>
<use-duplicate-detection>true</use-duplicate-detection>
<confirmation-window-size>10000000</confirmation-window-size>
<static-connectors>
<connector-ref>remote-connector</connector-ref>
</static-connectors>
</bridge>
</bridges>
Related
I am using ActiveMQ 5.16.1 on Windows. I set useJmx="true" in the <broker> section of activemq.xml. However, after starting ActiveMQ nothing is listening on the default JMX port 1099, and JConsole does not show ActiveMQ as a target.
I tried explicitly enabling the JMX connector in activemq.xml:
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
However, I get this failure in the ActiveMQ startup console:
WARN | Failed to start JMX connector Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind. Will restart management to re-create JMX connector, trying to remedy this issue.
This returns an empty result
netstat -an | grep 1099
JMX is most likely already running via the startup script-- hence the error message. I'm betting the netstat -na is run after the ActiveMQ process has given you the error and the process has already exited.
This is a confusing bit-- that setting in managementContext should be createConnector="false" when using the Apache ActiveMQ build.
Background: ActiveMQ is essentially a library, so it has features to support running in all sorts of different ways. When you start ActiveMQ from the Apache build download, the JMX settings are usually started using -D parameters found in the bin/setenv script. The managementContext setting is to instruct ActiveMQ s embedded in a different runtime/build that does not start JMX itself.
I have both a client and a broker running on a remote Linux machine within a Lora Network server that has a mosquitto connector.
The client can listen for the broker's broadcast from a certain address and port (#127.0.0.1:1883)
I would like to open an ssh tunnel between this remote machine and my machine (windows 10) to 'eavesdrop' on the communication between the client and the broker using MQTT.fx to run a mosquitto client;
So far I tried to:
Run ssh -L 22883:#remoteMachineAdress:1883 usern.ame#gatewayAdress -p222 on MobaXtrem](https://mobaxterm.mobatek.net/)
Then I launch a client on MQTT.fx to listen on the broker: 127.0.0.1 port 22883.
This establishes a connection to the broker. However, I am not receiving any of the messages passed to the original client (the one on the remote machine) receives.
Can anyone tell me what am I doing wrong?
And if there are any tutorials about this?
I appreciate all the help I can get, thank you in advance!
This configuration is correct, it was the connector on the server who was sending the data to a different application.
I was trying to run Apache Activemq , broker ran successfully at localhost. At same machine JMS producer , consumer Java applications ran successfully . BUT I changed Uri to tcp://192.168.1.1:61616 in activemq.xml and ran the broker in machine 1( 192.168.1.1) . I ran consumer in machine 1. I ran producer from machine 2 in LAN. But producer caused jms exception. ConnectException. Connection refused. As a result producer and consumer can not communicate in LAN . Please guide.
If I understand this correctly you have this setup:
Machine1: ActiveMQ Broker and Consumer
Machine2: Producer
Then you need to setup your configurations like this:
ActiveMQ Broker: in activemq.xml set to tcp://192.168.1.1:61616
Consumer: tcp://192.168.1.1:61616
Producer: tcp://192.168.1.1:61616
Thank you very much. It was firewall that was preventing connection. I disabled firewall, things is running fine. Regards.
I have installed two broker of Mosquitto (1.4.2-3.2x86_64)and RabbitMQ (3.5.3-1) using newest version so far on CentOS 6 servers. With default configuration i can sub/pub messages for each broker separately, this mean that MQTT is running normally.
But when i bridge Mosquitto server to a RabbitMQ server, i face below problem right after i change mosquitto.conf file:
"Connecting bridge (Rabbit-IP)
Socket error on client client_name, disconnecting".
My bridge configuration in mosquitto.conf is:
connection test
address Rabbitmq-IP
topic # both 0 local/ remote/
Can you explain to me !
Thanks !
Try to use this option in your config file for the bridge
try_private false
This is an option that will tell the other broker that this is a bridge connection and defaults to true and if the RabbitMQ doesn't supports it, then it would not allow you to connect.
I installed ActiveMQ 5.5.0 on my Windows machine, and it had a web console (http://localhost:8161/admin) working out of the box.
Then I installed ActiveMQ (same version) on a remote Linux box (IP: AAA.BBB.CCC.DDD), but whenever I point the browser to
http://AAA.BBB.CCC.DDD:8161/admin
I get the "Unable to connect" error in the browser.
The network connection is there, I can connect to AAA.BBB.CCC.DDD via ssh and to another web application running on the same server.
Therefore I think that the cause of the problem is wrong configuration of the embedded Jetty server of ActiveMQ.
How can fix the problem, i. e. enable the access to the web console from a remote browser?
In your ActiveMQ config file you should see something like:
<import resource="${activemq.base}/conf/jetty.xml"/>
This starts up an embedded Jetty container with the web console.
If you start the broker on the console, you should see the following if everything works
INFO | ActiveMQ WebConsole initialized.
INFO | Initializing Spring FrameworkServlet 'dispatcher'
INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
into /opt/activemq/apache-activemq-5.16.3/conf
open jetty.xml
change
<property name="host" value="127.0.0.1"/>
to
<property name="host" value="0.0.0.0"/>
restart activemq
I used this approach on a linux server running in VM but can be applied to any instance
Check whether 8161 port is opened for external connection. Also check whether another service creating a conflict.
If there is a conflict
change the jetty port in the {activemqfolder}/conf/jetty.xml.
locate the line that contains the 8161 and change it to the desirable port
To enable external connections to the port (in this instance i choose 8169) use
sudo iptables -I INPUT -p tcp --dport 8169 -j ACCEPT
Proceed to start the activemq ie {activemqfolder}/bin/activemq console to see the messages