On 15/01/13 15:29, Rafael Schloming wrote:
I'm guessing you need to set an address on the message. Messenger doesn't
expose direct control over connections or links. It will figure out what
connections/links to establish based on what address you specify on the
message (kind of like SMTP). You could use something like
"amqp://host/target".

If you post your messenger code snippet I'd be happy to comment in more
detail.

Thank you! So this was indeed my first idea of how to use it. So with what I suspect is the simplest possible example:

    Messenger mr = new MessengerImpl();
    mr.start();
    Message m = new MessageImpl();
    m.setAddress("amqp://localhost:5672/queue/test");
    mr.put(m);
    mr.send();

I then see Proton setting the name field on the attach frame to "/queue/test" - and source and target are blank:

1.0 frame decoded: {'v1_0.attach',[{name,{utf8,<<"/queue/test">>}},
                                   {handle,{uint,0}},
                                   {role,false},
                                   {snd_settle_mode,{ubyte,2}},
                                   {rcv_settle_mode,{ubyte,0}},
                                   {source,undefined},
                                   {target,undefined},
                                   {unsettled,undefined},
                                   {incomplete_unsettled,false},
                                   {initial_delivery_count,{uint,0}},
                                   {max_message_size,undefined},
                                   {offered_capabilities,undefined},
                                   {desired_capabilities,undefined},
                                   {properties,undefined}]}

(Please forgive the less-than-beautiful formatting from our adapter.)

Cheers, Simon

--
Simon MacMullen
RabbitMQ, VMware

Reply via email to