On 18 January 2017 at 10:45, Rob Godfrey <[email protected]> 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.
>

To be clear, the above is in regard to the AMQP Management spec. I'll
assume for now that Dispatch does not support a Json encoding.

Assuming that is the case, and that it won't quickly do so, the main
issue currently would be sending AMQP encoded maps and lists from the
JMS client to satisfy the content of the AMQP management messages the
router expects. While the clients MapMessages do use an AMQP encoded
map for its content, there are restrictions on its content in line
with the JMS spec, restrictions which I think the AMQP management spec
goes beyond. As Gordon mentioned, there is currently some undocumented
functionality in the client which would allow it to send more
generalised maps/lists encoded using the AMQP type system. If you set
the "JMS_AMQP_TYPED_ENCODING" boolean property to true on the clients
ObjectMessage (preferably before setting the Serializable body object)
its content will be encoded using the AMQP type system when sent
rather than as the output from an ObjectOutputStream as they normally
would be. Obligatory warning: this remains undocumented for good
reason, being incomplete and subject to change, though whats there
currently should work for Maps/Lists as needed here.

> In terms of receiving lists / maps I would assume that treating the
> received JMS Message as an ObjectMessage and casting that result to the
> correct type (List or Map as appropriate) will always work?  Though I
> should probably wait for Robbie to step in on this one :-)
>
> -- Rob

Yes, the received messages would be expected to turn up as
ObjectMessage in this case, and then you would need to treat the
content appropriately as e.g a Map/List.

>
> On 18 January 2017 at 11:39, Gordon Sim <[email protected]> wrote:
>
>> On 17/01/17 16:03, Rabih M wrote:
>>
>>> Hello,
>>>
>>> If I understood well, Qpid-Dispatch can be managed using Amqp messages.
>>> I saw that the management code is based on proton python binding.
>>>
>>> Do you think it is feasible to manage the dispatch router the same way
>>> from
>>> Qpid-Jms api?
>>>
>>
>> Yes, but only through an undocumented mechanism that is subject to change
>> at present. The issue is that it requires sending/receiving AMQP encoded
>> lists and maps which is not properly supported yet via the JMS API.
>>
>> Was there any work done in this direction before? Will it be too
>>> complicated to do it?
>>>
>>
>> The protocol is based on the draft of a 'management spec' from OASIS[1].
>> In general it is very easy to use as long as you can handle AMQP encoded
>> list and map content.
>>
>> The router has its own specific entities which are described (though from
>> the config file perspective) here:
>>
>> http://qpid.apache.org/releases/qpid-dispatch-0.6.0/man/
>> qdrouterd.conf.html
>>
>> The qdmanage tool is very useful for exploring things (e.g. GET-SCHEMA
>> etc).
>>
>> [1] https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web
>> &cd=1&cad=rja&uact=8&ved=0ahUKEwjnzIC-vcvRAhVn0YMKHTvABMEQFg
>> gfMAA&url=https%3A%2F%2Fwww.oasis-open.org%2Fcommittees%2F
>> download.php%2F52425%2Famqp-man-v1%25200-wd08.pdf&usg=AFQjCN
>> EDHTcSb8gSA2Uqx-bAkupHHcn92A
>>
>>
>> ---------------------------------------------------------------------
>> 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]

Reply via email to