Hello Guru's,
I am trying to use the JMSAppender to send messages to a topic in ActiveMQ
environment. I have never done this before and have proceeded to this point
and want to know if I am in the right direction...:).
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination destination = session.createTopic("YARDI.TOPIC1");
MessageProducer producer = session.createProducer(destination);
producer.setTimeToLive(10000);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
String text = "Hello world! From, please go to jConsole and let me see you
there..:)";
logger.info("Go to Yardi Topic.");
log4j.JMSAppender myappender = new JMSAppender();
//want to append messages to my topic here..I guess..
TextMessage message = session.createTextMessage(text);
producer.send(message);
session.close();
connection.close();
I would really appreciate it if somebody could point me in the right
direction. I am able to send simple text messages to the 'topic' that I have
created. I want to send my log messages produced by the logger to the
'topic'.
Any help will be much appreciated,
TIA.
Misty.