Hi Robbie and Team,

I was doing to reseacrh to find out solution for MessageProducer Status.

At this moment i am creating MessageProducer via below code.
MessageProducer producer = session.createProducer(destination);

After doing research, i got to know internally AmqpFixedProducer invoking
for Send operation. And the good thing is that, AmqpFixedProducer has both
operation "isClosed and isOpen". 
This will solve my problem. But the main problem is, how can i access
AmqpFixedProducer object.?

I tried to access via casting (with below code snippet) but that throwing
Casting exception. Could you please suggest, how can i access
AmqpFixedProducer object?

AmqpFixedProducer -- extends --> AmqpProducer -- extends -->
AmqpAbstractResource -- available methods --> isClosed and isOpen

AmqpFixedProducer amqpProducer = (AmqpFixedProducer) producer;  //
 "Getting java.lang.ClassCastException:
org.springframework.jms.connection.CachedMessageProducer cannot be cast to
org.apache.qpid.jms.provider.amqp.AmqpFixedProducer "

amqpProducer
.isClosed();

amqpProducer
.isOpen();


Regards,
Abhishek Kumar



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to