You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2014/12/17 19:20:12 UTC

Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/
-----------------------------------------------------------

Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.


Bugs: QPID-6256
    https://issues.apache.org/jira/browse/QPID-6256


Repository: qpid


Description
-------

* have a specific exception for signalling protocol mismatch up the stack
* use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer


Diffs
-----

  trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
  trunk/qpid/cpp/src/qpid/Exception.h 1646261 
  trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
  trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
  trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
  trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
  trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
  trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
  trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
  trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
  trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
  trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
  trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
  trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
  trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 

Diff: https://reviews.apache.org/r/29160/diff/


Testing
-------

* make test passes
* connects to qpidd when 0-10 has been disabled on broker
* connects to rabbitmq
* didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)


Thanks,

Gordon Sim


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Robbie Gemmell <ro...@gmail.com>.

> On Dec. 18, 2014, 7:44 p.m., Chug Rolke wrote:
> > The feature works, well done. However, when it works the user is hard pressed to tell that the connection went through. See note below.
> 
> Gordon Sim wrote:
>     I agree, will try and improve the logging.

Would it be possible not to log a warning (perhaps info/trace/debug?) when the first protcol version connection attempt fails if another is being tried? Unless the user has requested a particular protocol, trying one version and then another upon suggestion from the broker doesnt seem like something they need a warning about. Perhaps only that all attempts to connect with different versions failed.

I say this as the 0-x Java client used to do the same (though worse at one point, spitting out an exception stacktrace as well) when downgrading from a 0-10 attempt to try a lower version, and all it ever did was confuse people who dont understand protocols and versions (i.e lots of users) into asking what it meant.


- Robbie


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65523
-----------------------------------------------------------


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Gordon Sim <gs...@redhat.com>.

> On Dec. 18, 2014, 7:44 p.m., Chug Rolke wrote:
> > The feature works, well done. However, when it works the user is hard pressed to tell that the connection went through. See note below.
> 
> Gordon Sim wrote:
>     I agree, will try and improve the logging.
> 
> Robbie Gemmell wrote:
>     Would it be possible not to log a warning (perhaps info/trace/debug?) when the first protcol version connection attempt fails if another is being tried? Unless the user has requested a particular protocol, trying one version and then another upon suggestion from the broker doesnt seem like something they need a warning about. Perhaps only that all attempts to connect with different versions failed.
>     
>     I say this as the 0-x Java client used to do the same (though worse at one point, spitting out an exception stacktrace as well) when downgrading from a 0-10 attempt to try a lower version, and all it ever did was confuse people who dont understand protocols and versions (i.e lots of users) into asking what it meant.

I agree that would be desirable, I'll see what I can do.


- Gordon


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65523
-----------------------------------------------------------


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Alan Conway <ac...@redhat.com>.

> On Dec. 18, 2014, 7:44 p.m., Chug Rolke wrote:
> > trunk/qpid/cpp/src/qpid/messaging/Connection.cpp, line 87
> > <https://reviews.apache.org/r/29160/diff/1/?file=794181#file794181line87>
> >
> >     When this feature works the user is presented with an error and a warning, and then the retry silently succeeds. 
> >     
> >     2014-12-18 14:41:21 [System] error Caught exception in state: 3 with event: 1: Incorrect version: 1-0; expected 0-10 (/home/chug/git/qpid/qpid/cpp/src/qpid/client/Connector.cpp:89)
> >     2014-12-18 14:41:21 [Client] warning Connection [127.0.0.1:57107-127.0.0.1:5672] closed
> >     
> >     
> >     A better user experience might give an indication that the failed connection is being retried:
> >     
> >      QPID_LOG(warning, "Caught protocol version connection error. Retrying connection with a different AMQP version...");

I refactored the 1.0 protocol log messages to give more sensible reconnect log output for HA because it was confusing people, but I never did it for 0-10. Might be useful to refer to it just as FYI. It doesn't of course deal with retrys for protocol mismatch.


- Alan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65523
-----------------------------------------------------------


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Gordon Sim <gs...@redhat.com>.

> On Dec. 18, 2014, 7:44 p.m., Chug Rolke wrote:
> > The feature works, well done. However, when it works the user is hard pressed to tell that the connection went through. See note below.

I agree, will try and improve the logging.


- Gordon


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65523
-----------------------------------------------------------


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Chug Rolke <cr...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65523
-----------------------------------------------------------


The feature works, well done. However, when it works the user is hard pressed to tell that the connection went through. See note below.


trunk/qpid/cpp/src/qpid/messaging/Connection.cpp
<https://reviews.apache.org/r/29160/#comment108745>

    When this feature works the user is presented with an error and a warning, and then the retry silently succeeds. 
    
    2014-12-18 14:41:21 [System] error Caught exception in state: 3 with event: 1: Incorrect version: 1-0; expected 0-10 (/home/chug/git/qpid/qpid/cpp/src/qpid/client/Connector.cpp:89)
    2014-12-18 14:41:21 [Client] warning Connection [127.0.0.1:57107-127.0.0.1:5672] closed
    
    A better user experience might give an indication that the failed connection is being retried:
    
     QPID_LOG(warning, "Caught protocol version connection error. Retrying connection with a different AMQP version...");


- Chug Rolke


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Gordon Sim <gs...@redhat.com>.

> On Dec. 17, 2014, 11:43 p.m., Fred Cheng wrote:
> > Was RabbitMQ tested with AMQP protocol 0.91 or 1.0?  I believe RabbitMQ defaults is AMQP 0.91 unless the experimental plug-in was used.

RabbitMQ had 0.91 and 1.0 enabled. The qpid::messaging client doesn't support 0-91, RabbitMQ doesn't support 0-10. Qpid::messaging starts with 0-10 but when that is rejected by RabbitMQ it upgrades to 1.0 as desired.


- Gordon


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65389
-----------------------------------------------------------


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Fred Cheng <fr...@cal.berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65389
-----------------------------------------------------------


Was RabbitMQ tested with AMQP protocol 0.91 or 1.0?  I believe RabbitMQ defaults is AMQP 0.91 unless the experimental plug-in was used.

- Fred Cheng


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Gordon Sim <gs...@redhat.com>.

> On Dec. 18, 2014, 8:16 p.m., Alan Conway wrote:
> > trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp, line 409
> > <https://reviews.apache.org/r/29160/diff/1/?file=794173#file794173line409>
> >
> >     How can this line throw an exception?

Yes, that's a mistake left from an earlier iteration.


> On Dec. 18, 2014, 8:16 p.m., Alan Conway wrote:
> > trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp, line 34
> > <https://reviews.apache.org/r/29160/diff/1/?file=794183#file794183line34>
> >
> >     Factory* is not memory safe, should be a shared_ptr?

The registry simply a map of function pointers, not of objects.


> On Dec. 18, 2014, 8:16 p.m., Alan Conway wrote:
> > trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp, line 116
> > <https://reviews.apache.org/r/29160/diff/1/?file=794183#file794183line116>
> >
> >     info is too high for something that happens normally every time you connect.

Agreed, again just sloppiness on my part.


> On Dec. 18, 2014, 8:16 p.m., Alan Conway wrote:
> > trunk/qpid/cpp/src/qpid/messaging/Connection.cpp, line 82
> > <https://reviews.apache.org/r/29160/diff/1/?file=794181#file794181line82>
> >
> >     This is strange to me. You iterate over all the factories to create N ConnectionImpls in a linked list and then iterate over the impls till one works (possibly leaving some unused) 
> >     
> >     Why not iterate over the factories here and just create impls till one works, throwing away those that don't? 
> >     
> >     I find this eating a linked-list a bit odd.

I'm not hugely keen on this either. There were two reasons I ended up doing it for this iteration: (1) the url and map are no longer available on open(). I could get round this by having the impl instance provide accessors to them. At the moment though, e.g the 0-10 impl doesn't store the options as a map. I suppose I could have the superclass hold a version of the original options. (2) There would need to be some extra context passed in to subsequent calls to the registry to request the 'next' implementation. Actually though, on reflection, I think I'm possibly over complicating things and could just request am impl by name and hard code an order into open, avoiding the need for any extra state. I'll try that, it should clean things up a little.


- Gordon


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65373
-----------------------------------------------------------


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review65373
-----------------------------------------------------------


Looks like it would work, but I found it a little odd in places.


trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
<https://reviews.apache.org/r/29160/#comment108475>

    How can this line throw an exception?



trunk/qpid/cpp/src/qpid/messaging/Connection.cpp
<https://reviews.apache.org/r/29160/#comment108481>

    This is strange to me. You iterate over all the factories to create N ConnectionImpls in a linked list and then iterate over the impls till one works (possibly leaving some unused) 
    
    Why not iterate over the factories here and just create impls till one works, throwing away those that don't? 
    
    I find this eating a linked-list a bit odd.



trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp
<https://reviews.apache.org/r/29160/#comment108483>

    Factory* is not memory safe, should be a shared_ptr?



trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp
<https://reviews.apache.org/r/29160/#comment108477>

    info is too high for something that happens normally every time you connect.



trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp
<https://reviews.apache.org/r/29160/#comment108478>

    result should be an intrusive_ptr for consistency of memory management.
    
    Why a C list here? Wouldn't a vector be less error-prone?


- Alan Conway


On Dec. 17, 2014, 6:20 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 6:20 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1646261 
>   trunk/qpid/cpp/src/qpid/Exception.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1646261 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1646261 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1646261 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq
> * didn't connect to activemq 5.10 due to AMQ-5490, but that is fixed so should work against trunk (to be verified)
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/#review68608
-----------------------------------------------------------

Ship it!


This is a big step forward for interop with other 1.0 implementations, and will not break existing 0-10 applications which is good. Ship it! 

I still have a concern (which can be addressed separtely) that people using Qpid for the first time are still being steered by default to the old 0-10 protocol, and may unknowingly use features (eg. address extensions) only available with 0-10. This will slow adoption of 1.0 in all-Qpid systems and hinder interop when people realise that they must modify their systems in order to use the standard protocol. From my experience getting the HA tests to work with 1.0 (still not completely finished) this can be a significant effort even in python, worse in C++ where we don't provide a simple way to do management operations like deleting queues from within the application.

- Alan Conway


On Jan. 13, 2015, 9:50 p.m., Gordon Sim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29160/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2015, 9:50 p.m.)
> 
> 
> Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.
> 
> 
> Bugs: QPID-6256
>     https://issues.apache.org/jira/browse/QPID-6256
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> * have a specific exception for signalling protocol mismatch up the stack
> * use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer
> 
> 
> Diffs
> -----
> 
>   trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1651321 
>   trunk/qpid/cpp/src/qpid/Exception.h 1651321 
>   trunk/qpid/cpp/src/qpid/client/Connection.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/ConnectionHandler.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/Connector.h 1651321 
>   trunk/qpid/cpp/src/qpid/client/Connector.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1651321 
>   trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1651321 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h 1651321 
>   trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1651321 
>   trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1651321 
> 
> Diff: https://reviews.apache.org/r/29160/diff/
> 
> 
> Testing
> -------
> 
> * make test passes
> * connects to qpidd when 0-10 has been disabled on broker
> * connects to rabbitmq and pending activemq 5.11
> 
> 
> Thanks,
> 
> Gordon Sim
> 
>


Re: Review Request 29160: Allow automatically upgrading to 1.0 if 0-10 is neither required nor supported by peer

Posted by Gordon Sim <gs...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29160/
-----------------------------------------------------------

(Updated Jan. 13, 2015, 9:50 p.m.)


Review request for qpid, Alan Conway, Chug Rolke, and Justin Ross.


Changes
-------

Updated based on review comments


Bugs: QPID-6256
    https://issues.apache.org/jira/browse/QPID-6256


Repository: qpid


Description
-------

* have a specific exception for signalling protocol mismatch up the stack
* use this to try alternative(s) in the event protocol is not explicitly specified and first choice isn't supported by peer


Diffs (updated)
-----

  trunk/qpid/cpp/include/qpid/messaging/exceptions.h 1651321 
  trunk/qpid/cpp/src/qpid/Exception.h 1651321 
  trunk/qpid/cpp/src/qpid/client/Connection.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/ConnectionHandler.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/Connector.h 1651321 
  trunk/qpid/cpp/src/qpid/client/Connector.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/TCPConnector.cpp 1651321 
  trunk/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp 1651321 
  trunk/qpid/cpp/src/qpid/framing/ProtocolInitiation.h 1651321 
  trunk/qpid/cpp/src/qpid/messaging/Connection.cpp 1651321 
  trunk/qpid/cpp/src/qpid/messaging/ConnectionImpl.h 1651321 
  trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.h 1651321 
  trunk/qpid/cpp/src/qpid/messaging/ProtocolRegistry.cpp 1651321 
  trunk/qpid/cpp/src/qpid/messaging/exceptions.cpp 1651321 

Diff: https://reviews.apache.org/r/29160/diff/


Testing (updated)
-------

* make test passes
* connects to qpidd when 0-10 has been disabled on broker
* connects to rabbitmq and pending activemq 5.11


Thanks,

Gordon Sim