You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Gary Taylor <sq...@SDF.ORG> on 2015/09/23 20:54:28 UTC
Unable to get federation routing between two exchanges.
I am trying to set up a federation between two brokers and
am unable to get a route working between the two. I've
included a script below that I've been using and it may be easier
to understand than my verbal explanation.
Exchange A on localhost port 5673 is the destination.
Exchange B on localhost port 5674 is the source.
So I'm trying to route from B > A.
As part of the script I send this message using spout:
spout -b localhost:5674 B.Q
Message(properties={'spout-id':
'1209db3e-225c-40f1-8017-3c62bd7120b2:0'})
It never arrives at Exchange A.
Can anyone tell me what I've missed?
# qpid-route route map localhost:5674
Finding Linked Brokers:
localhost:5674... Ok
Dynamic Routes:
none found
Static Routes:
none found
# qpid-route route map localhost:5673
Finding Linked Brokers:
localhost:5673... Ok
localhost:5674... Ok
Dynamic Routes:
none found
Static Routes:
localhost:5673(ex=A.EX) <= localhost:5674(queue=B.Q)
In case the output below from qpid-stat gets wrapped badly,
the qpid-stat shows
1 msg
1 msgIn
0 msgOut
# qpid-stat -b localhost:5674 -q
Queues
queue dur autoDel excl msg msgIn msgOut bytes bytesIn bytesOut cons bind
=========================================================================================================================
B.Q 1 1 0 0 0 0 0 1
bf340247-2a41-4863-baf9-f42a5aaa2a56:0.0 Y Y 0 0 0 0 0 0 1 2
## Begin script
#!/bin/bash
# Exchange A. Start a process as a daemon. Use non-default
# port to ensure commands are pointing to correct daemon.
/usr/sbin/qpidd -d -p 5673 --pid-dir /root/brokerA/
--data-dir /root/brokerA
# Add exchange, queue, and bind the two with wildcard.
qpid-config -b localhost:5673 add exchange topic A.EX
qpid-config -b localhost:5673 add queue A.Q
qpid-config -b localhost:5673 bind A.EX A.Q '#'
# Exchange B. Start a process as a daemon. Use non-default
# port to ensure commands are pointing to correct daemon.
/usr/sbin/qpidd -d -p 5674 --pid-dir /root/brokerB/
--data-dir /root/brokerB
# Add queue to B.
qpid-config -b localhost:5674 add queue B.Q
# Add routing queue
qpid-route queue add localhost:5673 localhost:5674 A.EX B.Q
# Add route between A and B. ??? necessary ???
#qpid-route route add localhost:5673 localhost:5674 A.EX B.Q
'#'
echo "Go to another session and type 'drain -f -b
localhost:5673 A.Q'"
#drain -f -b localhost:5673 A.Q
echo "Press enter when done"
read
echo "Sending spout -b localhost:5674 B.Q"
/usr/share/doc/python-qpid-0.18/examples/api/spout -b
localhost:5674 B.Q
echo
echo
echo
echo "For reference: commands to shut down brokers."
echo "/usr/sbin/qpidd -d -p 5673 --pid-dir /root/brokerA/
--data-dir /root/brokerA -q "
echo "/usr/sbin/qpidd -d -p 5674 --pid-dir /root/brokerB/
--data-dir /root/brokerB -q "
## End script
Thanks,
Gary
--
squeaky@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Unable to get federation routing between two exchanges.
Posted by Gary Taylor <sq...@SDF.ORG>.
Resolved the issue and answering my own question for future reference.
Saw this in /var/log/messages
[Broker] warning Client closed connection with 320: ACL denied anonymous@QPID creating a federation link (qpid/broker/ConnectionHandler.cpp:204)
Modified /etc/qpid/qpidd.acl by commenting the "deny" line as below:
#acl deny all create link
Gary
--
squeaky@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org