How do i change the logging in runtime in ActiveMQ Artemis broker - activemq-artemis

In case of any network issues or during triage some other issue, I would like to enable logging in the ActiveMQ Artemis broker (2.6.1) without restarting the broker to get more logging.
Currently I'm restarting the broker after enabling/disabling logging in logging.properties
logger.level=DEBUG
In ActiveMQ 5.x there is a JMX operation exposed (as mentioned in https://activemq.apache.org/how-do-i-change-the-logging). I couldn't find similar one for Artemis.

The version of ActiveMQ Artemis you're using doesn't support reloading logging configuration at runtime. This functionality was implemented via ARTEMIS-2121 so you'll need to move to 2.6.4 or 2.7.0 to get it.
Once you update your logging.properties the broker will reload it and a message will be logged that the logging configuration was reloaded. By default it may take up to 5 seconds to reload (based on the configuration-file-refresh-period in broker.xml which defaults to 5000 milliseconds).

Related

How to configure ActiveMQ Artemis as a broker in JBoss 4?

I configured a standalone ActiveMQ-5.16.1 to be used as a broker from a JBoss 4.2.3 server and my Camel-routes are able to get messages send from another component a ServerMix-Adaptor to this broker.
I replaced the standalone ActiveMQ-5.16.1 with an ActiveMQ Artemis-2.17.0 broker and besides few changes to the subscriptions the whole system is working.
I am aware that ActiveMQ 5.16.1 and ActiveMQ Artemis 2.17.0 are quite different, and I am trying to replace the activemq-rar-5.4.3.rar downloaded from here with the artemis-rar-2.17.0.rar downloaded from here. This .rar file is deployed under $JBOSS_HOME/server/default/deploy together with an *-ds.xml file.
In the *-ds.xml file 2 connection factories are declared, one for for queues and one for topics. This file references a file contained in the activemq-rar-5.4.3.rar META-INF/ra.xml and in this file are defined the connection-factories.
The problem is that even though the artemis-rar-2.17.0.rar contains the same META-INF/ra.xml file it's not obvious and not documented what to configure and how to configure it.
I couldn't find an example or a documentation about this.

ActiveMQ Browser setup for ActiveMQ Artemis

I am trying install ActiveMQ Browser, and I wanted to connect with my ActiveMQ Artemis server. How do we configure that?
I assume you're talking about this ActiveMQ Browser GUI tool.
If that assumption is correct then there's no way to integrate it with ActiveMQ Artemis as it's hard-coded to use the specific JMX management beans from ActiveMQ 5.x.
I recommend you use the ActiveMQ Artemis web console. It has a rich set of functionality that should cover most of the use-cases you're interested in. Among other things, it will allow you to:
Send new messages to addresses.
Delete messages.
Move messages to another address.
Create or delete addresses & queues.
Shutdown broker.
etc.

How to unlock ActiveMQ Artemis broker

I did something to lock my ActiveMQ Artemis 2.8.1 broker. I needed to run > ./artemis data exp to get data on my queue setup. It failed to run, giving an error saying that the broker was locked: /var/lib/[broker]/lock
So I stopped the broker and ran the data exp successfully, but now when I try to start the broker I get the same error, and I don't know how to stop whatever was started by data exp.
Error: There is another process using the server at /var/lib/broker1/lock. Cannot start the process!*
So how do I unlock the broker in this situation? I've tried using systemctl to restart Artemis all together, but that didn't do anything. And the Artemis tab is missing entirely from Console.
You should be able to simply remove the lock file at /var/lib/broker1/lock and then start the broker again.

Messages delivered twice at same instant to AMQP message consumer (ActiveMQ Artemis)

I recently had to rollback from WF13 to WF11 due to a regression in one of the dependencies.
Now I am trying to get the AMQP protocol to work on WildFly 11's messaging system. I am running a high availability setup with two nodes. Each of the node has a message consumer locally. This message consumer connects through AMQP1. I've added io.netty as a dependency to the org/apache/activemq/artemis/protocol/amqp module and updated org/apache/qpid to get the AMQP protocol to work (see also WFLY-7823). Now my AMQP message consumer works fine, but it seems to receive messages always exactly twice, and it appears to be even in the same frame. This happens on the same node (the other node receives messages through the bridge if the message isn't handled locally in the first place). So on one node and one queue consumer, I receive every message exactly twice, at the very same instant, before I even got to send an ACK/NACK for the first message I received.
I don't remember seeing this issue on WildFly 13.
Are there any known regressions regarding how messages are sent through the remote connectors? Perhaps an issue in the AMQP protocol? Or could it be a compatibility issue with the updated version of qtip?
For what it's worth Wildfly only uses ActiveMQ Artemis to fulfill their need for a JMS implementation (i.e. a traditional part of Java EE). I don't believe Wildfly has any real interest in other protocols or APIs aside from JMS.
My understanding here is that if you need to support multi-protocol message use-cases you should likely be using a standalone broker. I believe this is why none of the other protocols which Artemis supports (e.g. AMQP, STOMP, MQTT, OpenWire) are enabled in Wildfly or have documentation on how to enable them (aside from the occasional forum post).
It's also worth noting that Wildfly 11 has Artemis 1.5.5 in it which is 10 releases or so behind the latest version (i.e. 2.6.2). Much work has been done on the AMQP implementation in those releases so I think you're best served by using a standalone version of Artemis rather than Artemis embedded in Wildfly.

Admin console for hornetq

Is there any sort of admin UI available for hornetQ.
Below are the operations we would like to do with admin UI
I need to monitor the messages in the queue(message content as well)
Purging the messages.
Creating queues
#anoop, you can try jconsole. It will list queue under MBeans.
The HornetQ code-base was donated to the Apache ActiveMQ community several years ago and is now Apache ActiveMQ Artemis. The latest versions of Apache ActiveMQ Artemis ship with a web-based administration console where you can do things like purge messages and create queues, etc.