qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Ross <tr...@redhat.com>
Subject Re: Qpid proton not receiving messages sent directly to exchange
Date Fri, 17 Oct 2014 16:35:43 GMT


On 10/17/2014 12:13 PM, Tim Wojtulewicz wrote:
> 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?

I don't see why this shouldn't work.  Can you confirm with qpid-stat
that the message was delivered to the queue?  Have you tried it with the
current Proton (not the forked one)?

> Thanks,
> 
> Tim
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message