Bug 661500 - Connection option syntax is inconsistent across languages and documentation is ambiguous
Summary: Connection option syntax is inconsistent across languages and documentation i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
: 659322 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-08 20:34 UTC by Ted Ross
Modified: 2014-09-24 15:02 UTC (History)
6 users (show)

Fixed In Version: qpid-cpp-0.9.1079953
Doc Type: Bug Fix
Doc Text:
Cause: C++ client used hyphen rather than underscore in connection option names (e.g. reconnect-interval rather than reconnect_interval). It also silently ignored options it did not recognise. Consequence: Option names were different from those used in python, and incorrect options were hard to spot as the client silently ignored them. Fix: Client now recognises both old names and the python equivalents for consistency. It also throws an exception if an unrecognised option is encountered. Result: More consistency; easier to spot errors.
Clone Of:
Environment:
Last Closed: 2014-09-24 15:02:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-3115 0 None None None Never
Red Hat Bugzilla 959445 0 unspecified CLOSED Several connection options are missing in the doc 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 959446 0 medium CLOSED Several mistyped connection options in the API documentation 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 959447 0 low CLOSED missing 'protocol' connection option description in the messaging api doc 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 959448 0 low CLOSED Report error when encountering unrecognized connection option 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2014:1296 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.0 Release 2014-09-24 19:00:06 UTC

Internal Links: 959445 959446 959447 959448

Description Ted Ross 2010-12-08 20:34:21 UTC
Description of problem:

The connection option syntax is subtly different between the language bindings.  For example, to set the reconnect limit, the syntax is the following:

in C++:    reconnect-limit
in Python: reconnect_limit

The documentation uses the Python syntax but does not call out the C++ differences.

To compound the problem, unrecognized options in C++ are silently ignored.  If a user chooses the wrong syntax (as he would do if he read the documentation), the option does not take effect and the default is used instead, leading to unpredictable and undesired results.

At the very least, the documentation needs to be enhanced to clarify this issue.  A better solution would be to make the syntax the same in all languages.  If there are characters that are illegal in certain languages, those characters should be avoided.

Comment 1 Ted Ross 2010-12-08 20:37:10 UTC
*** Bug 659322 has been marked as a duplicate of this bug. ***

Comment 2 Gordon Sim 2011-03-07 11:38:23 UTC
Tracked upstream as https://issues.apache.org/jira/browse/QPID-3115

Comment 4 Gordon Sim 2011-03-07 16:15:09 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
C++ client used hyphen rather than underscore in connection option names (e.g. reconnect-interval rather than reconnect_interval). It also silently ignored options it did not recognise.

Consequence:
Option names were different from those used in python, and incorrect options were hard to spot as the client silently ignored them. 

Fix:
Client now recognises both old names and the python equivalents for consistency. It also throws an exception if an unrecognised option is encountered.

Result:
More consistency; easier to spot errors.

Comment 7 Petr Matousek 2013-08-12 14:27:58 UTC
The issue has been fixed. Verified on RHEL6.4 (i386, x86_64)

packages installed:
qpid-cpp-*-0.22-10

-> VERIFIED

Comment 9 errata-xmlrpc 2014-09-24 15:02:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1296.html


Note You need to log in before you can comment on or make changes to this bug.