Like the title said, I want to send logs using "log4j.appender.jms" but to a queue. The configuration that I have is this:
log4j.appender.jms=org.apache.log4j.net.JMSAppender
log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
log4j.appender.jms.ProviderURL=tcp://localhost:61616
log4j.appender.jms.TopicBindingName=logTopic
log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
log4j.appender.jms.Threshold=ERROR
This configuration is working, but like you see, is sending the information to a Topic instead of a Queue.
So I want to know if someone knows if is possible to send this logs to a queue using an appender like this one? Any suggestions of how can I do this?.
Thanks in advance.
No, not using the base code. See here, the log4j JMSAppender uses Topics not Queues. You could always create a clone of this appender and switch all the Topics to Queues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With