You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Vadim Chekan (JIRA)" <ji...@apache.org> on 2008/08/28 20:06:52 UTC

[jira] Created: (AMQNET-110) WireFormatNegotiator does not negotiate version

WireFormatNegotiator does not negotiate version
-----------------------------------------------

                 Key: AMQNET-110
                 URL: https://issues.apache.org/activemq/browse/AMQNET-110
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ Client
            Reporter: Vadim Chekan
            Assignee: James Strachan


Apparently WireFormatNegotiator checks only magic bytes during the
format negotiation and does not check the version.
So NMS client V2 talks to ActiveMQ V3.

394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
WireFormatInfo[ Magic=System.Byte[] Version=2
MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
StackTraceEnabled=False, TcpNoDelayEnabled=False,
TightEncodingEnabled=False} ]
395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
WireFormatInfo[ Magic=System.Byte[] Version=3
MarshalledProperties={CacheEnabled=True, CacheSize=1024,
SizePrefixDisabled=False, TightEncodingEnabled=True,
MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
StackTraceEnabled=True, TcpNoDelayEnabled=True} ]

Please note that even though ActiveMQ claimed V# protocol, NMS client accepted it.
According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-110) WireFormatNegotiator does not negotiate version

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45336#action_45336 ] 

Jim Gomes commented on AMQNET-110:
----------------------------------

I looked at the code, and the NMS client does check the wireformat version.  It requests a minimum version, and seems to be OK with a higher version.  I would deduce from this implementation that it is assuming that future versions of OpenWire are backward compatible.  This means that the client can talk V2, even if the server is talking V3.  However, it won't accept a reverse scenario where the client wants to only talk V3, but the server can only talk V2.

So, this leaves the question: is it OK for the client to talk V2 to a broker talking V3?  So far, I have not seen any adverse problems from this scenario.  If anyone knows of any real or potential problems with this scenario, please write them up.

> WireFormatNegotiator does not negotiate version
> -----------------------------------------------
>
>                 Key: AMQNET-110
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-110
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>            Reporter: Vadim Chekan
>            Assignee: James Strachan
>
> Apparently WireFormatNegotiator checks only magic bytes during the
> format negotiation and does not check the version.
> So NMS client V2 talks to ActiveMQ V3.
> 394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
> WireFormatInfo[ Magic=System.Byte[] Version=2
> MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
> StackTraceEnabled=False, TcpNoDelayEnabled=False,
> TightEncodingEnabled=False} ]
> 395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
> with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
> 403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
> WireFormatInfo[ Magic=System.Byte[] Version=3
> MarshalledProperties={CacheEnabled=True, CacheSize=1024,
> SizePrefixDisabled=False, TightEncodingEnabled=True,
> MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
> StackTraceEnabled=True, TcpNoDelayEnabled=True} ]
> Please note that even though ActiveMQ claimed V3 protocol, NMS client accepted it.
> According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQNET-110) WireFormatNegotiator does not negotiate version

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Gomes resolved AMQNET-110.
------------------------------

    Resolution: Working as Designed

> WireFormatNegotiator does not negotiate version
> -----------------------------------------------
>
>                 Key: AMQNET-110
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-110
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>            Reporter: Vadim Chekan
>            Assignee: Jim Gomes
>            Priority: Minor
>
> Apparently WireFormatNegotiator checks only magic bytes during the
> format negotiation and does not check the version.
> So NMS client V2 talks to ActiveMQ V3.
> 394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
> WireFormatInfo[ Magic=System.Byte[] Version=2
> MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
> StackTraceEnabled=False, TcpNoDelayEnabled=False,
> TightEncodingEnabled=False} ]
> 395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
> with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
> 403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
> WireFormatInfo[ Magic=System.Byte[] Version=3
> MarshalledProperties={CacheEnabled=True, CacheSize=1024,
> SizePrefixDisabled=False, TightEncodingEnabled=True,
> MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
> StackTraceEnabled=True, TcpNoDelayEnabled=True} ]
> Please note that even though ActiveMQ claimed V3 protocol, NMS client accepted it.
> According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQNET-110) WireFormatNegotiator does not negotiate version

Posted by "Vadim Chekan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vadim Chekan updated AMQNET-110:
--------------------------------

    Description: 
Apparently WireFormatNegotiator checks only magic bytes during the
format negotiation and does not check the version.
So NMS client V2 talks to ActiveMQ V3.

394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
WireFormatInfo[ Magic=System.Byte[] Version=2
MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
StackTraceEnabled=False, TcpNoDelayEnabled=False,
TightEncodingEnabled=False} ]
395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
WireFormatInfo[ Magic=System.Byte[] Version=3
MarshalledProperties={CacheEnabled=True, CacheSize=1024,
SizePrefixDisabled=False, TightEncodingEnabled=True,
MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
StackTraceEnabled=True, TcpNoDelayEnabled=True} ]

Please note that even though ActiveMQ claimed V3 protocol, NMS client accepted it.
According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

  was:
Apparently WireFormatNegotiator checks only magic bytes during the
format negotiation and does not check the version.
So NMS client V2 talks to ActiveMQ V3.

394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
WireFormatInfo[ Magic=System.Byte[] Version=2
MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
StackTraceEnabled=False, TcpNoDelayEnabled=False,
TightEncodingEnabled=False} ]
395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
WireFormatInfo[ Magic=System.Byte[] Version=3
MarshalledProperties={CacheEnabled=True, CacheSize=1024,
SizePrefixDisabled=False, TightEncodingEnabled=True,
MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
StackTraceEnabled=True, TcpNoDelayEnabled=True} ]

Please note that even though ActiveMQ claimed V# protocol, NMS client accepted it.
According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.


> WireFormatNegotiator does not negotiate version
> -----------------------------------------------
>
>                 Key: AMQNET-110
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-110
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>            Reporter: Vadim Chekan
>            Assignee: James Strachan
>
> Apparently WireFormatNegotiator checks only magic bytes during the
> format negotiation and does not check the version.
> So NMS client V2 talks to ActiveMQ V3.
> 394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
> WireFormatInfo[ Magic=System.Byte[] Version=2
> MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
> StackTraceEnabled=False, TcpNoDelayEnabled=False,
> TightEncodingEnabled=False} ]
> 395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
> with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
> 403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
> WireFormatInfo[ Magic=System.Byte[] Version=3
> MarshalledProperties={CacheEnabled=True, CacheSize=1024,
> SizePrefixDisabled=False, TightEncodingEnabled=True,
> MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
> StackTraceEnabled=True, TcpNoDelayEnabled=True} ]
> Please note that even though ActiveMQ claimed V3 protocol, NMS client accepted it.
> According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-110) WireFormatNegotiator does not negotiate version

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45337#action_45337 ] 

Jim Gomes commented on AMQNET-110:
----------------------------------

Taken from the [OpenWire Specification documentation|http://activemq.apache.org/openwire-version-2-specification.html] :

{quote}
OpenWire is an extensible in that it supports adding new encoding options while still being backward compatible with previous versions of the protocol. Every OpenWire protocol session initially starts with all encoding options turned off and at version 1 of command marshalers. An initial WIREFORMAT_INFO command is exchanged between the two nodes so that additional encoding features can be enabled. If both sides request an encoding feature to be enabled then it will be enabled. The command marshalers used will be the highest version that they both support.
{quote}

Based on this, I do not think this negotiation log exposes a bug, but rather the inner-workings of the OpenWire negotiation process.

> WireFormatNegotiator does not negotiate version
> -----------------------------------------------
>
>                 Key: AMQNET-110
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-110
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>            Reporter: Vadim Chekan
>            Assignee: Jim Gomes
>            Priority: Minor
>
> Apparently WireFormatNegotiator checks only magic bytes during the
> format negotiation and does not check the version.
> So NMS client V2 talks to ActiveMQ V3.
> 394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
> WireFormatInfo[ Magic=System.Byte[] Version=2
> MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
> StackTraceEnabled=False, TcpNoDelayEnabled=False,
> TightEncodingEnabled=False} ]
> 395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
> with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
> 403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
> WireFormatInfo[ Magic=System.Byte[] Version=3
> MarshalledProperties={CacheEnabled=True, CacheSize=1024,
> SizePrefixDisabled=False, TightEncodingEnabled=True,
> MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
> StackTraceEnabled=True, TcpNoDelayEnabled=True} ]
> Please note that even though ActiveMQ claimed V3 protocol, NMS client accepted it.
> According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQNET-110) WireFormatNegotiator does not negotiate version

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Gomes updated AMQNET-110:
-----------------------------

    Assignee: Jim Gomes  (was: James Strachan)
    Priority: Minor  (was: Major)

> WireFormatNegotiator does not negotiate version
> -----------------------------------------------
>
>                 Key: AMQNET-110
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-110
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>            Reporter: Vadim Chekan
>            Assignee: Jim Gomes
>            Priority: Minor
>
> Apparently WireFormatNegotiator checks only magic bytes during the
> format negotiation and does not check the version.
> So NMS client V2 talks to ActiveMQ V3.
> 394 [-1211205856] INFO Apache.NMS.Tracer (null) - SENDING:
> WireFormatInfo[ Magic=System.Byte[] Version=2
> MarshalledProperties={CacheEnabled=False, SizePrefixDisabled=False,
> StackTraceEnabled=False, TcpNoDelayEnabled=False,
> TightEncodingEnabled=False} ]
> 395 [-1225606256] DEBUG Apache.NMS.Tracer (null) - Parsing type: 1
> with: Apache.NMS.ActiveMQ.OpenWire.V1.WireFormatInfoMarshaller
> 403 [-1225606256] INFO Apache.NMS.Tracer (null) - RECEIVED:
> WireFormatInfo[ Magic=System.Byte[] Version=3
> MarshalledProperties={CacheEnabled=True, CacheSize=1024,
> SizePrefixDisabled=False, TightEncodingEnabled=True,
> MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000,
> StackTraceEnabled=True, TcpNoDelayEnabled=True} ]
> Please note that even though ActiveMQ claimed V3 protocol, NMS client accepted it.
> According to the current code in WireFormatNegotiator  only magic bytes are checked but not the version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.