You could use -Dqpid.heartbeat=x or use heartbeat as a broker url property.

Btw, Please don't use the AMQ** classes. These are internal classes
that will not be there going forward.
It's better to use the JMS interfaces.

Rajith

On Fri, Nov 18, 2011 at 11:17 AM, Gaston Quezada
<quezada.gas...@gmail.com> wrote:
> 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
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to