Hi Rugene,

With java broker you can create DLQ on creation your normal by
specifying the following arguments:

"x-qpid-dlq-enabled" = true
"x-qpid-maximum-delivery-count"=<max delivery count value>

Here is a java client example how to do it

        final Map<String,Object> arguments = new HashMap<String, Object>();
        arguments.put("x-qpid-dlq-enabled", new Boolean(true));
        arguments.put("x-qpid-maximum-delivery-count", new Integer(5));
        ((AMQSession<?,?>) session).createQueue(new
AMQShortString(queueName), false, true, false, arguments);
        Queue queue = session.createQueue(queueName);
        ((AMQSession<?,?>) session).declareAndBind((AMQDestination)queue);

Also, for 0-8/0-9/0-9-1 amqp java client you need to specify a client
behaviour using one of the the following options
1) System.setProperty("qpid.reject.behaviour", "server"); or
-Dqpid.reject.behaviour=server
2) by adding an option into connection URL rejectbehaviour='server'
3) by adding an option into destinationURL rejectbehaviour='server'

When enabled for a given queue, the DLQ feature causes generation of a
Dead Letter Exchange and a Dead Letter Queue, named according to the
convention <queue_name>_DLE and <queue_name>_DLQ. When max delivery
count limit is reached then the message is routed through the dead
letter exchange onto the DLQ and removed from the original queue.

Kind Regards,
Alex

On 12 March 2012 15:10, eugene <[email protected]> wrote:
> Hello,
>
> Is there a way to make my Queue as the Dead Letter Queue in Qpid
> programmatically? I mean I have my Queue like this:
>
> Queue queue = .... // somehow create the queue, may be cast it to AMQueue
>
> and then add some kind of property to make it the Default Dead Letter Queue?
>
> Thank You,
> Eugene.
>
> --
> View this message in context: 
> http://apache-qpid-developers.2158895.n2.nabble.com/qpid-Queue-DLQ-tp7365593p7365593.html
> Sent from the Apache Qpid developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

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

Reply via email to