Hi, session.exchangeDeclare(arg::exchange = "AlterExch", arg::type = "direct"); session.queueDeclare(arg::queue = "AlterQueue", arg::exclusive=false, arg::autoDelete=false); session.exchangeBind(arg::exchange = "AlterExch", arg::queue = "AlterQueue", arg::bindingKey = "Alter_Key");
session.queueDeclare(arg::queue = "messageQ", arg::exclusive = false, arg::autoDelete = false , arg::alternateExchange = ""); session.exchangeBind(arg::exchange = "amq.direct", arg::queue = "messageQ", arg::bindingKey = "routing_Key"); Also we have set setDiscardUnroutable(false); message.getDeliveryProperties.setDiscardUnroutable(false); and transfer the 10 messages to queue "messageQ" with acceptMode ACCEPT_MODE_NONE. Next we delete the messageQ queue containing 10 msgs, so as per concept of alternate exchange these msgs should be re-routed to queue bound with the alternate exchange, but its gets dropped. qpid-tool and qpid-config was used to view the queue , alternate-exchange status and delete the queue respectively. deleteing the "messageQ" if you check the status of the alternate-exchange it shows msgReceives 10 and msgDrops 10. Just need to know where exactly are we wrong. Regards, Gordon Sim wrote: > > ft420 wrote: >> Hi, >> > > > > >> alternate-exchange option is provided in queuedeclare function where >> you >> specify a exchange name. >> >> This option is used to route those message which are ophaned or >> rejected. >> >> I tried the option but then messages get dropped in the specified >> alternate exchange instead of getting routed to that particular exchange >> queue. > > I'm not clear on what the issue is here. The messages should be routed > to the alternate-exchange which will then enqueue them to any queue with > a matching binding. Could you give a bit more detail? > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > > -- View this message in context: http://n2.nabble.com/alternate-exchange-tp3085324p3085547.html Sent from the Apache Qpid users mailing list archive at Nabble.com. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
