How to change the ActiveMQ Broker's logging configuration at runtime?

Solution Verified - Updated -

Environment

  • Fuse Message Broker all versions

Issue

How can I change the ActiveMQ Broker's logging configuration at runtime without having to restart the broker?

Resolution

Using JMX you can tell the broker to reload its logging configuration at runtime.

Simply follow these steps (assuming the Broker is already running):

  • Make the necessary changes to your Broker's logging configuration in conf/log4j.properties
  • Connect to the Broker using jconsole
  • Drill into the org.apache.activemq context
  • Select the Broker Mbean
  • Select Operations
  • Click the ReloadLog4jProperties operation

The broker will reload and reinitialize its logging configuration.

JConsole

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments