You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Mats Forslöf <Ma...@portwise.com> on 2006/03/16 09:35:43 UTC

OpenWire tight/loose encoding

Hi,

We need some additional information on the OpenWire protocol to wrap up our work on the C++ AMQ client. 

1. To use loose encoding what do we have to do, is it simply to set the tight encoding attribute to false on the OpenWireFormat package and then send each package attributes one after each other?

2. What determines the order of the attributes on each package? The order now seems to be determined by the groovy scripts.

3. What about the order of the boolean flags used in tight encoding, what does each position stand for?

I must ask you of some documentation on this because we cannot verify that our code is correct otherwise.

Please help!

Regards,
Mats Forslöf

Re: OpenWire tight/loose encoding

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Hi Mats!

On 3/16/06, Mats Forslöf <Ma...@portwise.com> wrote:
> Hi,
>
> We need some additional information on the OpenWire protocol to wrap up our work on the C++ AMQ client.
>
> 1. To use loose encoding what do we have to do, is it simply to set the tight encoding attribute to false on the OpenWireFormat package and then send each package attributes one after each other?
>

OpenWire should always start up in loose encoding mode, in version 1
of the protocol, with all options off by default.  This ensures
backward compatibitlity since future clients will beforced to be
backward compatible to even start talking.  The clients then exchange
a WireFormatInfo which contains information about the highest version
of the protocol and requested protocol options that should be turned
on.  After that exchange both sides can upgrade the version and
options to a set that is compatible between the 2 ends.

> 2. What determines the order of the attributes on each package? The order now seems to be determined by the groovy scripts.

They are in the order that they were defined in the orifinal Java
command classes.  The groovy script just preserves the order.

>
> 3. What about the order of the boolean flags used in tight encoding, what does each position stand for?
>

The bits in the BooleanStream are also serialized in the same order.

> I must ask you of some documentation on this because we cannot verify that our code is correct otherwise.
>

Any time!  I guess we need to update the C++ guy to support loose
encoding since that is now the minimum requirement.  At least it's
much simpler to implement.  Should I work on that or have you guys
allready have that covered?

Regards,
Hiram

> Please help!
>
> Regards,
> Mats Forslöf
>


--
Regards,
Hiram