activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "james strachan (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (AMQ-681) Tight encoding not the default; wire format negotiation needs work
Date Mon, 22 May 2006 12:57:51 GMT
     [ https://issues.apache.org/activemq/browse/AMQ-681?page=all ]

james strachan reassigned AMQ-681:
----------------------------------

    Assign To: Hiram Chirino

> Tight encoding not the default; wire format negotiation needs work
> ------------------------------------------------------------------
>
>          Key: AMQ-681
>          URL: https://issues.apache.org/activemq/browse/AMQ-681
>      Project: ActiveMQ
>         Type: Bug

>   Components: Broker
>     Reporter: Andrew Lusk
>     Assignee: Hiram Chirino

>
>
> In OpenWireFormat.java, tightEncoding defaults to false, when, since it's the historical
format, it should be true.
> Wire format negotiation isn't really negotiation.  Since the broker defaults to loose
encoding, it sends a loosely-encoded WireFormatInfo message to connecting clients, and expects
loosely-encoded WireFormatInfo messages from them.  This not only enforces that clients implement
loose marshalling and unmarshalling, but fails when the client sends a well-formatted but
tightly-encoded WireFormatInfo message.
> The broker fails in this case because it assumes that the client and broker both have
the same concept of what encoding is the default, when in actuality the encoding of a message
should be part of the actual message, allowing the broker to handle clients who prefer either
format (and may not have the other format even implemented).
> The broker should also only ever send messages in the format asked for by the client
- it should wait to send a WireFormatInfo until it has received one from the client indicating
its preferred format.
> I suggest two changes:
>   * adding a leading byte to all messages indicating their encoding
>   * the broker should wait to send a WireFormatInfo until it has received one from the
connecting client, whose preferences override all broker defaults for that connection
> The requirement that the server and client have shared, non-obvious information from
the beginning (like which encoding is default) causes ugly problem in the broker like this,
when it gets a message of a type it didn't expect:
> Exception in thread "tcp:///127.0.0.1:54316" java.lang.IllegalArgumentException: Invalid
version: 1297154048, could not load org.apache.activemq.openwire.v1297154048.MarshallerFactory

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message