On 07/12/16 18:17, Gary Taylor wrote:
I'm trying to use the messaging api to mimic the qpid-config commands below. I
believe something is wrong with my address but can't see what it is.
$ qpid-config add exchange topic myexchange
$ qpid-config add queue myqueue
$ qpid-config bind myexchange myqueue '#'
$ qpid-config exchanges -r
Exchange '' (direct)
bind [5be8da1e-4c2e-4140-8974-5bb53772bd9c:0.0] =>
5be8da1e-4c2e-4140-8974-5bb53772bd9c:0.0
bind [myqueue] => myqueue
Exchange 'amq.direct' (direct)
Exchange 'amq.fanout' (fanout)
Exchange 'amq.match' (headers)
Exchange 'amq.topic' (topic)
Exchange 'myexchange' (topic)
bind [#] => myqueue
Exchange 'qmf.default.direct' (direct)
Exchange 'qmf.default.topic' (topic)
bind [direct.6a7a68d7-8ab3-4e5d-a0bd-7e6db581d5dc] =>
5be8da1e-4c2e-4140-8974-5bb53772bd9c:0.0
Exchange 'qpid.management' (topic)
I first do the connection/session set up:
broker = "amqp:tcp:zd5100:5672"
connection = Qpid::Messaging::Connection.new :url => broker
connection.open
session = connection.create_session
This attempt fails:
session.create_receiver "myexchange;{create:always, delete:always , node:{
type:topic, x-declare:{auto-delete:True}, x-bindings:[{exchange:'myexchange',
queue:'myqueue', key:'#'}] } } "
[Client] warning Exception received from broker: not-found: Bind failed. No
such queue: myqueue (qpid/broker/Broker.cpp:1265) [caused by 3 \x07:\x04]
ResolutionError: Create failed for exchange myexchange; not-found: Bind failed.
No such queue: myqueue (qpid/broker/Broker.cpp:1265)
So let's use myqueue as the node instead and change type to queue. Also fails.
session.create_receiver "myqueue;{create:always, delete:always , node:{ type:queue,
x-declare:{auto-delete:True}, x-bindings:[{exchange:'myexchange', queue:'myqueue',
key:'#'}] } } "
[Client] warning Exception received from broker: not-found: Exchange not found:
myexchange (qpid/broker/ExchangeRegistry.cpp:144) [caused by 2 \x07:\x04]
ResolutionError: Creation failed for queue myqueue; not-found: Exchange not
found: myexchange (qpid/broker/ExchangeRegistry.cpp:144)
Other permutations all fail. Any suggestions?
myexchange; {create: always, delete: always, node: {type: topic,
x-declare:{auto-delete:True}}, link: {name:myqueue}}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]