Thanks Robbie,

For the JMS, i will try to do that and i will keep you posted for the
result.

Concerning Proton-j:
I configured the Target.
But the connector is still not created on the qpid-dispatch side...

I compared the sent packets using wireshark but i don't think there are
significant differences.
I attached the amqp exchanges in both cases.

Do you think i have some missing info in my proton-j message?

Thanks,
Rabih

On Fri, Jan 20, 2017 at 7:09 PM, Robbie Gemmell <[email protected]>
wrote:

> On 20 January 2017 at 17:29, Rabih M <[email protected]> wrote:
> > Hello,
> >
> > Thank you for you answers.
> >
> > I am trying to experiment to see if i can do it with the info you gave
> me.
> >
> > I took a simple example to start: qdmanage -b <dispatch-machine>:5672
> create
> > --type=connector role=route-container addr=broker-machine port=5673
> > name=rabih.connector
> > My goal is to imitate the behavior using JMS and Proton-j.
> >
> > First, I tried with JMS (attached the code):
> > I used an ObjectMessage with JMS_AMQP_TYPED_ENCODING set to true. And I
> used
> > the proton-j encoder to encode the map before sending it.
> > But, I am getting a MessageFormatException("Failed to serialize object")
> >
> > Do you have any idea how can i pass the byte array without failing?
> >
>
> I'd be rather surprised if this is actually what you want to do. I'd
> expect you to set the map directly on the JMS ObjectMessage, and then
> thanks to the special flag the client will encode it itself as an
> amqp-value section containing a map (which now that ive kept reading,
> matches what you are attempting with proton-j).
>
> >
> > Second, I tried with Proton-j (attached code):
> > The code i wrote is based on send example in proton-j.
> > But the problem is that i am not able to find how to set the destination
> > queue of the message. (i used Message.setAddress() but it is wrong)
> >
> > How can i set a destination queue for the sender or message?
>
> To give the link an addres you need to set the link 'source' and
> 'target' and use the latter to indicate the address for the sending
> link before you open it. E.g for address "queue", the most basic
> config would be:
>
> +            Target target = new Target();
> +            target.setAddress("queue");
> +            snd.setTarget(target );
> +            snd.setSource(new Source());
>
>
> >
> > PS. I used wireshark to see the amqp messages that are passing on the
> > network and copy the message parameters.
> >
> >
> > Best Regards,
> > Rabih
> >
> > On Wed, Jan 18, 2017 at 2:35 PM, Rob Godfrey <[email protected]>
> > wrote:
> >>
> >> So I think what we said - and I can't find it written down anywhere in
> the
> >> draft, though we reference the JSON spec in the pre-amble, is that any
> >> value in the headers or body should be able to be sent in the native
> AMQP
> >> type (and we might need some words there about converting between
> various
> >> numeric types), or as a JSON serialized string.  We didn't (to my
> >> recollection) talk about whether there should be a way for the requester
> >> to
> >> be able to influence the form of the reply.
> >>
> >> Currently the implementation of AMQP Management in the Qpid Broker for
> >> Java
> >> follows the above conventions (any inbound value can be in the native
> >> type,
> >> or as a JSON string which can convert to the desired type, however there
> >> is
> >> no mechanism for controlling the nature of responses).
> >>
> >> Perhaps this is something we should talk about soon ;-) ?
> >>
> >> -- Rob
> >>
> >> On 18 January 2017 at 14:29, Ted Ross <[email protected]> wrote:
> >>
> >> >
> >> >
> >> > On 01/18/2017 07:45 AM, Gordon Sim wrote:
> >> >
> >> >> On 18/01/17 10:45, Rob Godfrey wrote:
> >> >>
> >> >>> In terms of sending maps/lists I think we said (at OASIS), though it
> >> >>> is
> >> >>> possibly not yet in the draft spec, that Json formatted equivalents
> >> >>> should
> >> >>> be able to be used for all values... however I have no idea if the
> >> >>> Dispatch
> >> >>> Router supports that.
> >> >>>
> >> >>
> >> >> I think that would be very sensible.
> >> >>
> >> >
> >> > Dispatch Router does not support Json formatted bodies at present, but
> >> > this is a feature that I would be in favor of putting on the roadmap.
> >> >
> >> >
> >> >
> >> >>
> >> >> ------------------------------------------------------------
> ---------
> >> >> To unsubscribe, e-mail: [email protected]
> >> >> For additional commands, e-mail: [email protected]
> >> >>
> >> >>
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [email protected]
> >> > For additional commands, e-mail: [email protected]
> >> >
> >> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
Advanced Message Queueing Protocol
    Length: 85
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: open (16)
    Arguments
        Container-Id: 46387ab2-dab7-43d6-b148-309150a8c0a3
        Hostname: green-lx-slave1
        Channel-Max: 32767
Advanced Message Queueing Protocol
    Length: 33
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: begin (17)
    Arguments
        Next-Outgoing-Id: 0
        Incoming-Window: 2147483647
        Outgoing-Window: 2147483647
Advanced Message Queueing Protocol
    Length: 141
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: attach (18)
    Arguments
        Name: 46387ab2-dab7-43d6-b148-309150a8c0a3-$management
        Handle: 0
        Role: sender
        Send-Settle-Mode: mixed (2)
        Receive-Settle-Mode: first (0)
        Source
            Terminus-Durable: none (0)
            Timeout: 0
            Dynamic: False
        Target
            Address: $management
            Terminus-Durable: none (0)
            Timeout: 0
            Dynamic: False
        Initial-Delivery-Count: 0
        Max-Message-Size: 0
Advanced Message Queueing Protocol
    Length: 154
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: attach (18)
    Arguments
        Name: 
46387ab2-dab7-43d6-b148-309150a8c0a3-7724d42f-b90c-45cb-ba82-49a28bee0d67
        Handle: 1
        Role: receiver
        Send-Settle-Mode: mixed (2)
        Receive-Settle-Mode: first (0)
        Source
            Terminus-Durable: none (0)
            Timeout: 0
            Dynamic: True
        Target
            Terminus-Durable: none (0)
            Timeout: 0
            Dynamic: False
        Initial-Delivery-Count: 0
        Max-Message-Size: 0
Advanced Message Queueing Protocol
    Length: 42
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: flow (19)
    Arguments
        Next-Incoming-Id: 0
        Incoming-Window: 2147483647
        Next-Outgoing-Id: 0
        Outgoing-Window: 2147483647
        Handle: 1
        Delivery-Count: 0
        Link-Credit: 1
        Drain: False
Advanced Message Queueing Protocol
    Length: 322
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: transfer (20)
    Arguments
        Handle: 0
        Delivery-Id: 0
        Delivery-Tag: 31
        Message-Format: 0
        Settled: False
        More: False
    Message-Header
        Durable: False
        Priority: 4
        First-Acquirer: False
        Delivery-Count: 0
    Message-Properties
        Reply-To: amqp:/_topo/0/router.10521/temp.pGtkJFXoG2Nb4_a
        Correlation-Id: 1
        Expiry-Time: Jan  1, 1970 00:00:00.000000000 UTC
        Creation-Time: Jan  1, 1970 00:00:00.000000000 UTC
        Group-Sequence: 0
    Application-Properties (map of 3 elements)
        operation (str8-utf8): CREATE
        type (str8-utf8): org.apache.qpid.dispatch.connector
        name (str8-utf8): rab.connector
    [Expert Info (Error/Protocol): Unexpected map type at frame position 240 of 
field "AMQP-Value"]
        [Unexpected map type at frame position 240 of field "AMQP-Value"]
        [Severity level: Error]
        [Group: Protocol]
Advanced Message Queueing Protocol
    Length: 33
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: open (16)
    Arguments
        Container-Id: 
        Hostname: green-lx-slave1
Advanced Message Queueing Protocol
    Length: 32
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: begin (17)
    Arguments
        Next-Outgoing-Id: 1
        Incoming-Window: 2147483647
        Outgoing-Window: 2147483647
        Handle-Max: 65535
Advanced Message Queueing Protocol
    Length: 47
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: attach (18)
    Arguments
        Name: s1
        Handle: 0
        Role: sender
        Send-Settle-Mode: mixed (2)
        Receive-Settle-Mode: first (0)
        Target
            Address: $management
        Incomplete-Unsettled: False
        Initial-Delivery-Count: 0
Advanced Message Queueing Protocol
    Length: 192
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: transfer (20)
    Arguments
        Handle: 0
        Delivery-Id: 0
        Delivery-Tag: 30
        Message-Format: 0
        Settled: True
    Application-Properties (map of 3 elements)
        operation (str8-utf8): CREATE
        name (str8-utf8): rabih.connector
        type (str8-utf8): org.apache.qpid.dispatch.connector
    [Expert Info (Error/Protocol): Unexpected map type at frame position 114 of 
field "AMQP-Value"]
        [Unexpected map type at frame position 114 of field "AMQP-Value"]
        [Severity level: Error]
        [Group: Protocol]
Advanced Message Queueing Protocol
    Length: 16
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: detach (22)
    Arguments
        Handle: 0
        Closed: True
Advanced Message Queueing Protocol
    Length: 12
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: end (23)
    Arguments
Advanced Message Queueing Protocol
    Length: 12
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: close (24)
    Arguments
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to