activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Bertram <>
Subject Re: activemq-artemis & JNDI & Spring Boot & log4j2 & JMS Appender.
Date Wed, 13 Mar 2019 17:10:41 GMT
Based on your response I'm guessing you read the documentation and didn't
find it particularly helpful so let's start from the top.

I assume that when you say, "Trying to configure log4j2 JMS Appender for
activemq-artemis which uses JNDI for the connection factory and
destinations," that you've got a remote client using Log4j and you want to
configure it to send log messages to ActiveMQ Artemis. Is that correct?

If so, you just need to configure the client with the right JNDI

Note, all the JNDI configuration is done on the *client* side. There is no
Artemis "JNDI Service." For what it's worth, this is noted in the
documentation I cited:

  > Apache ActiveMQ Artemis does not have a JNDI server. Rather, it uses a
client-side JNDI implementation that relies on special properties set in
  > the environment to construct the appropriate JMS objects. In other
words, no objects are stored in JNDI on the Apache ActiveMQ Artemis server,
  > instead they are simply instantiated on the client based on the
provided configuration.

Therefore, configuring JNDI on the client shouldn't require a restart of
the broker.

The Log4j JMS appender's configuration apparently doesn't support setting
arbitrary InitialContext environment properties so you'll need to create a file on the client and make sure it's on the classpath.
This is where you'll define the destination which the appender will use,


Then reference that from your JMS appender's configuration, e.g.:

         <JMS name="jmsQueue"

             destinationBindingName ="jmsTest"
             password="xxx" >
            <JSONLayout compact="false" eventEol="true"/>

I might have missed something in there, but that's the basic configuration
off the top of my head. Let me know if you have additional problems.


On Wed, Mar 13, 2019 at 11:43 AM Peter Chandler <> wrote:

> Of course.
> 1. I add some *stuff* to file.
> 2. Configure the log4j2.xml file with *stuff*
> 3. Restart activemq-artemis?
> --
> Sent from:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message