All messengers are created with default constructor (uuid-based names).
The 'broker' messenger does a pn_messenger_subscribe("amqp://~")
All messages are constructed with address amqp:// and leave reply_to unset (so it's set to amqp://$uuid)

Broker does application-level routing of messages
  a publisher sends a special 'register' message
replies are constructed using stored 'reply_to' address from incoming message forwarded messages are constructed using stored 'reply_to' address from incoming 'registration' messages

Messenger routing facility is not used in any way.
All Messengers are running in async mode (broker and client library share the same 'event loop code').
We're using outgoing trackers, mostly for the 'buffered' check
All incoming messages are accepted as soon as they are processed.
All outgoing messages are settled as soon as they are not buffered anymore

maybe it'd be possible to simulate the situation by commenting out the pni_pump_out() in pn_messenger_put(), that, or at least checking if sender link address really has anything to do with
the address calculated in pn_messenger_put()


On 24. 10. 13 20:25, Rafael Schloming wrote:
Can you post the exact addresses and routing configuration you're using and
which direction messages are flowing? I'd like to try to simulate this
using the example send/recv scripts.

My guess is that the issue may not be so much related to whether the
addresses are NULL or not but whether there are multiple receivers
competing for the same messages.


On Thu, Oct 24, 2013 at 11:52 AM, Bozo Dragojevic<>wrote:


Chasing down a weird behavior...

looking at messengers pni_pump_out() and how it's used from

    link = pn_link_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE);
    while (link) {
      if (pn_link_is_sender(link)) {
        pni_pump_out(messenger, pn_terminus_get_address(pn_**link_target(link)),

is it really fair to assume that target address is always expected to be
non NULL?

I've added a bit of debug code to pn_messenger_endpoints() so it reads:

   link = pn_link_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE);
   while (link) {
     if (pn_link_is_sender(link)) {
       static int addrnull, addrok;
       const char *address = pn_terminus_get_address(pn_**
       if (!address) {
       } else {
       fprintf(stderr, "links with null address: %d links with ok address
               addrnull, addrok);
       pni_pump_out(messenger, address, link);

and I never see 'addrok' change from 0

when pni_pump_out is called with address==NULL:

int pni_pump_out(pn_messenger_t *messenger, const char *address, pn_link_t
   pni_entry_t *entry = pni_store_get(messenger->**outgoing, address);
   if (!entry) return 0;

pni_store_get cheerfuly returns first message on the list

end effect is that random clients start receiving messages not directed at

For some inexplicable reason is mostly works out while there are just two
connected to the messenger and we're not pushing it really hard. Still
trying to come
up with a simple test-case.

Can anyone shed some light how the addressing on the link level is
supposed to work in mesenger?


Reply via email to