Hi Gordon And Robbie,

Thanks a lot for your response. I think you are right it seems upper level
exception. 
After doing research, i came on below conclusion. 

Problem - If we create only Connection(without producer and consumer) and
kept Connection idle without creating producer and consumer, then we are
receiving "idle timeOut" error. 
Workaround - If we create Connection with producer/consumer and kept idle
without doing anything, then we are not receiving any error. 
Conclusion - It seems, we definitely need to have one active
producer/consumer 

Requirement - Need to create producer on demand.

Could you please suggest best approach to handle this scenario.

Please find below code snippet and attached example
(TestQpidSendIdleTimeout.java).

//CODE

        Connection connection = connectionFactory.createConnection(USERNAME,
PASSWORD);
        connection.setExceptionListener(this); // Settted ExceptionListener
        connection.start();
        
        //*********** WORK_AROUND ***********//
        //if we create producer, then we will not get inactive connection 
timeOut
error. 
        //it seems we should definitely have one producer/consumer otherwise we
will get
        //connection timeOut error
        
        /*Session session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
        Destination destination = session.createQueue(QUEUE_NAME);
        MessageProducer messageProducer = session.createProducer(destination);*/

Regards,
Abhishek Kumar

TestQpidSendIdleTimeout.java
<http://qpid.2158936.n2.nabble.com/file/t396358/TestQpidSendIdleTimeout.java>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to