Re: put a message in queue using org.apache.activemq.broker.Broker

2015-06-09 Thread Christopher Shannon
I'm glad that helped. At a quick glance your new code looks pretty good. The important thing was being able to only send the message to the "next" broker so that your broker filter doesn't get called in an infinite loop and your new code does this. Your new code is also much more efficient than b

Re: put a message in queue using org.apache.activemq.broker.Broker

2015-06-09 Thread Altounisi
Thank you very much christopher.l.shannon. Your reply helped me to solve the problem. This is the new code (the modifications are in bold) for any one who may be interested. Your critics are welcomed of course. Regards, public class MyBroker extends BrokerFilter { public MyBroker(Broker ne

Re: put a message in queue using org.apache.activemq.broker.Broker

2015-06-08 Thread christopher.l.shannon
As you have found out you shouldn't try and use the JMS client api from inside the broker, as that is for client code. I'm not entirely sure I understand why you can't use advisory topics but if you want to send a message to another destination from inside the broker there are lots of good examples