On 08/27/2012 03:07 PM, naveen_muguda wrote:
Hello,I am newbie to the qpid world and seek your assistance on the following problem involving qpid. A business problem i am trying to solve requires me to forward all messages from one qpid server to another. To solve this. I have tried the following setup. one two machines A and B i have setup 0.16 version of C++ QPID brokers I have created an exchange called 'c' on each other brokers, the exchange was added as a direct and durable exchange. I tried to setup a route between the two brokers as follows ' qpid-route route add B:5672 A:5672 c a.b' I have verified the route creation using 'qpid-route route list B', i also see a qpid created queue, which is bound to c on B. I created a Java client and sent the traffic to A a-la the snippet below "AMQConnection connection = new AMQConnection( "A", 5672, "", "","A", "/test" ); Session session = connection.createSession( true, Session.AUTO_ACKNOWLEDGE); AMQAnyDestination outboundQ = new AMQAnyDestination("ADDR:"+"c"+"; {create: always}" ); outboundQ.setRoutingKey( new AMQShortString("a.b") ); " The message reaches A, but gets dropped without reaching B. Trace on either machine didn't reveal much.
How did you determine that the message didn't reach B? You can use "qpid-stat -e -b A:5672" to look at the exchange statistics on broker A. After you send the message, you should see msgIn=1 and msgOut=1 for exchange "c". If msgOut is zero and msgDrop=1, there is a problem with the routing key on the message not matching the binding key for your route. Did you try using a destination address of "ADDR:c/a.b"? The {create:always} should not be needed because the exchange has to exist to set up the route.
"qpid-stat -e -b B:5672" will tell you if the message arrived at the "c" exchange on router B (you did create this exchange right?). If there is no consumer or queue on B bound to "a.b", the message will be dropped in the exchange on B.
I have disabled security on both of the qpid brokers. And also opened all the ports between A and B. I have tried a similar setup on a pair of 0.12 brokers with a similar result. Please let me know what could be wrong and how to fix the same. Thanks, Naveen -- View this message in context: http://qpid.2158936.n2.nabble.com/qpid-route-not-working-as-desired-tp7581323.html Sent from the Apache Qpid users 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]
