Yes, session#createProducer gives the impl for MessageProducer interface. You should use the method I mentioned earlier in the thread to set the TTL.
On Wed, Jul 31, 2013 at 3:58 AM, ssahu <sonal.sa...@wipro.com> wrote: > When i do session.createProducer(..) ,will it automatically create the > implementation for MessageProducer ?? > > Then will i be able to call messageProducer.setTimeTOLive(2000); ??? > > How can i be able to call messageProducer.setTimeTOLive(2000); as it is > giving compilation error on this line??? > > I imported javax.jms.MessageProducer class .NO error for it. > I did messageProducer=session.createProducer(..) after that but still i am > not able to call messageProducer.setTimeToLive(2000);.It is giving > compilation error. > > > Thanks And Regards, > Sonal > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/How-to-expire-or-set-time-to-live-for-topic-messages-tp4667952p4669907.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta