Dear Friends
How do I configure client qpid Timeout for java?
i am using qpid-client-0.12 with amqp version 0.10 and using asyncronous
listener
My code:
public void toConsumer() throws AMQPConsumerException {
try{
AMQConnectionFactory factory = new
AMQConnectionFactory(SWProperties.getString("connectionfactory.qpid",
System.getProperty(type + "sw.properties")));
this.connection = factory.createConnection();
this.connection.start();
/*
*
* creamos el consumidor
* de colas y agregamos
* cliente al manejador
* de eventos
* MessageListener
**************************
*/
AMQShortString exchangeName = new
AMQShortString(SWProperties.getString("exchange.output",
System.getProperty(type + "sw.properties")));
AMQShortString queueName = new AMQShortString(this.replyTo);
AMQShortString routingkeyName = new AMQShortString(this.replyTo);
System.out.println("exchangeName|" + exchangeName);
System.out.println("queueName|" + queueName);
System.out.println("routingkeyName|" + routingkeyName);
AMQQueue queue = new AMQQueue(exchangeName, routingkeyName,
queueName, false, false, false);
Session session=
this.connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
MessageConsumer messageConsumer = session.createConsumer(queue);
messageConsumer.setMessageListener(this);
this.shutdownHook.await();
synchronized (this){try{this.wait(25);}catch (InterruptedException
ie){}}
this.connection.close();
}
catch (Exception e){throw new AMQPConsumerException(e);}
}//fin-metodo
Thanks
--
Gastón Quezada