Yes, the Python version works as I would expect, modulo:

* It strips the leading "/" from the target address
* On my machine, "localhost" resolves to ::1, and Proton appears not to support IPv6.

But both of those can be worked around. Thank you!

Cheers, Simon

On 15/01/13 16:11, Rafael Schloming wrote:
That looks to me like it's a bug, possibly in the Java Messenger
implementation, or possibly some kind of interop bug. Any chance you
could try the same example in python and see if it works any better?

messenger = Messenger()
messenger.start()

msg = Message()
msg.address = "amqp://localhost:5672/queue/test"
messenger.put(msg)
messenger.send()

messenger.stop()

--Rafael

On Tue, Jan 15, 2013 at 10:46 AM, Simon MacMullen <si...@rabbitmq.com
<mailto:si...@rabbitmq.com>> wrote:

    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




--
Simon MacMullen
RabbitMQ, VMware

Reply via email to