I inserted the map directly into the ObjectMessage like you told me Robbie
and it worked.

But like the proton-j case, the connector is not being created on the
Qpid-dispatch side.
I attached the amqp communication into this mail.

Best regards,
Rabih

On Fri, Jan 20, 2017 at 7:24 PM, Rabih M <[email protected]> wrote:

> 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: 245
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: open (16)
    Arguments
        Container-Id: ID:f0721e5f-0c49-4bad-806d-9d544a84f298:1
        Hostname: green-lx-slave1
        Max-Frame-Size: 1048576
        Channel-Max: 32767
        Idle-Timeout: 30000
        Desired-Capabilities (array of 1 element)
        Properties (map of 3 elements)
            product (str8-utf8): QpidJMS
            version (str8-utf8): 0.11.1
            platform (str8-utf8): JVM: 1.7.0_79, 24.79-b02, Oracle Corporation, 
OS: Windows 7, 6.1, amd64
Advanced Message Queueing Protocol
    Length: 32
    Doff: 2
    Type: AMQP (0)
    Channel: 0
    Performative: begin (17)
    Arguments
        Next-Outgoing-Id: 1
        Incoming-Window: 2047
        Outgoing-Window: 2147483647
        Handle-Max: 65535
Advanced Message Queueing Protocol
    Length: 32
    Doff: 2
    Type: AMQP (0)
    Channel: 1
    Performative: begin (17)
    Arguments
        Next-Outgoing-Id: 1
        Incoming-Window: 2047
        Outgoing-Window: 2147483647
        Handle-Max: 65535
Frame 8475: 313 bytes on wire (2504 bits), 313 bytes captured (2504 bits) on 
interface 0
Ethernet II, Src: Dell_bf:c1:53 (d4:ae:52:bf:c1:53), Dst: IETF-VRRP-VRID_01 
(00:00:5e:00:01:01)
Internet Protocol Version 4, Src: 10.27.41.235, Dst: 10.25.8.35
Transmission Control Protocol, Src Port: 4653, Dst Port: 10521, Seq: 370, Ack: 
270, Len: 259
Advanced Message Queueing Protocol
    Length: 259
    Doff: 2
    Type: AMQP (0)
    Channel: 1
    Performative: attach (18)
    Arguments
        Name: 
qpid-jms:sender:ID:a8243ec1-dcaa-4f3a-a910-bff554969335:1:1:1:$management
        Handle: 0
        Role: sender
        Send-Settle-Mode: unsettled (0)
        Receive-Settle-Mode: first (0)
        Source
            Address: ID:a8243ec1-dcaa-4f3a-a910-bff554969335:1:1:1
            Terminus-Durable: none (0)
            Expiry-Policy: session-end
            Timeout: 0
            Dynamic: False
            Outcomes (array of 2 elements)
                Outcomes (sym8): amqp:accepted:list
                Outcomes (sym8): amqp:rejected:list
        Target
            Address: $management
            Terminus-Durable: none (0)
            Expiry-Policy: session-end
            Timeout: 0
            Dynamic: False
            Capabilities (array of 1 element)
                Capabilities (sym8): queue
        Incomplete-Unsettled: False
        Initial-Delivery-Count: 0
Advanced Message Queueing Protocol
    Length: 329
    Doff: 2
    Type: AMQP (0)
    Channel: 1
    Performative: transfer (20)
    Arguments
        Handle: 0
        Delivery-Id: 0
        Delivery-Tag: 30
        Message-Format: 0
    Message-Header
        Durable: True
    Message-Annotations (map of 2 elements)
        x-opt-jms-msg-type (byte): 1
        x-opt-jms-dest (byte): 0
    Message-Properties
        Message-Id: ID:a8243ec1-dcaa-4f3a-a910-bff554969335:1:1:1-1
        To: $management
        Creation-Time: Jan 20, 2017 18:27:50.707000000 UTC
    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 250 of 
field "AMQP-Value"]
        [Unexpected map type at frame position 250 of field "AMQP-Value"]
        [Severity level: Error]
        [Group: Protocol]
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