qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fraser Adams <fraser.ad...@blueyonder.co.uk>
Subject pn_subscription_address is empty more than is useful......
Date Fri, 26 Sep 2014 16:51:07 GMT
pn_subscription_address returns the source address of a subscription as 
a string when a subscription is successfully made.

Well rather, it should.

If I were to subscribe to a node on a broker it seems to work fine, that 
is to say if I have an address of say:

localhost/test

where test is a queue called test, then it works fine. Even if I do

localhost/#

A call to pn_subscription_address will contain the whole address 
including the dynamic node name once the broker has created the queue.

In my case I'm using non-blocking code and pn_subscription_address will 
get called several times in my notifier, initially returning NULL but 
eventually returning the information I want.

So far so good, but if I have an address of say:

amqp://~0.0.0.0

or even say

amqp://~0.0.0.0/test

I never get a non-NULL address.


It's actually quite useful to be able to identify that Messenger has 
successfully created a subscription, especially for asynchronous code. 
I've used it in code connecting to a broker to actually start doing 
something useful on a dynamic queue but for peer-peer code I can't do 
the same.

Perhaps with amqp://~0.0.0.0 I can assume that they have been 
immediately created? Is that a safe assumption?

Cheers,
Frase



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


Mime
View raw message