qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Wojtulewicz <tim...@ieee.org>
Subject Qpid proton not receiving messages sent directly to exchange
Date Fri, 17 Oct 2014 16:13:11 GMT
We have some code written using the normal qpid C++ messaging API in
qpid-0.26 that opens a receiver using an address that creates a queue on
the fly. This queue includes x-bindings to only receive messages that have
the subject set to match. It then sits and listens for messages to be
received on that queue. We have some other code that opens a sender and
posts messages directly to the amq.topic exchange. Since the queues are
created on the topic exchange, the messages are filtered and delivered to
the queues that have their x-bindings set correctly.

Receiver:

qpid::messaging::Address addr("test_queue; {create: always, delete:
receiver, mode: consume, node: {type: queue, x-declare: {auto-delete:
true}}, link: {x-declare: {arguments: {no-local: true}},
x-bindings:[{exchange: 'amq.topic', queue: 'test_queue', key:
'129.1.10.2'}],}}";
qpid::messaging::Receiver recv = session.createReceiver(addr);

Sender:

qpid::messaging::Sender sender = session.createSender("amq.topic");
qpid::messaging::Message msg;
msg.setSubject("129.1.10.2");
msg.setContent("test");
sender.send(msg);

I recently started working on some Android code and instead of reinventing
the wheel and writing a bridge to connect our current qpid code to Android,
I found a fork of qpid-proton that supports Android (
https://github.com/AppPlatPerf/qpid-proton/tree/AndroidProton/proton-a)
Instead of going write into integrating this into my Android code, I
decided to run a quick test program using proton-c to see if I could
actually get it to work with the C API.

And here's where I have problems.

I created a queue manually using qpid-config including adding some bindings
to it. Then using the example code in that github repo (see
https://github.com/AppPlatPerf/qpid-proton/tree/AndroidProton/examples/messenger/c)
and attached the receiver to the queue. Using a separate program I sent a
message directly to the amq.topic exchange with the subject set to match
the binding. The message was never received. Is there something that that
example isn't doing that I need to do to receive these messages? Am I doing
it wrong by using queues? What am I missing?
Thanks,

Tim

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message