Bug 1009454 - [amqp1.0] Different behavior of amqp1.0 client on creating already existing object
Summary: [amqp1.0] Different behavior of amqp1.0 client on creating already existing o...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-09-18 13:17 UTC by Petr Matousek
Modified: 2015-01-21 12:56 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.22-30
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:56:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Matousek 2013-09-18 13:17:16 UTC
Description of problem:

When trying to create an exchange of different type with the same name as already existing exchange, no error message is displayed and return code is equal to 0 using the amqp1.0 client.

Following error is displayed using other clients:
Create failed for exchange ex; not-allowed: not-allowed: Exchange declared to be of type topic, requested fanout (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/SessionAdapter.cpp:120)

This puts amqp0-10 and 1.0 out of sync.

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-14

How reproducible:
100%

Steps to Reproduce:
1. spout --connection-options {protocol:amqp1.0} "ex;{create: always,node:{type: topic,x-declare:{type:topic}}}" 
2. spout --connection-options {protocol:amqp1.0} "ex;{create: always,node:{type: topic,x-declare:{type:fanout}}}" 
3. echo $?

Actual results:
No error message displayed, return value is equal to 0

Expected results:
Error message is displayed, return value is non-zero

Comment 1 Gordon Sim 2013-09-20 15:47:09 UTC
Fixed upstream: https://svn.apache.org/r1525040

Comment 2 Gordon Sim 2013-09-23 09:26:34 UTC
Also needs https://svn.apache.org/r1525541 for compilation on RHEL.

Comment 3 Petr Matousek 2014-01-03 09:16:53 UTC
The issue has been fixed. Verified on RHEL6.4 (i386, x86_64)

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

-> VERIFIED

Comment 4 Petr Matousek 2014-01-03 09:33:26 UTC
There is a side effect of this change, the exception is displayed even if the exchange type is not specified in the address (if the exchange already exist):

qpid-send -a "amq.direct; {create:always, node:{type:topic}}" --connection-options="{protocol:amqp1.0}"
qpid-send: Link detached by peer with amqp:precondition-failed: Exchange of different type already exists

(message not sent, exception received, return code 1)

using amqp0-10:
# qpid-send -a "amq.direct; {create:always, node:{type:topic}}"
(message sent, no exception, return code 0)

Comment 5 Gordon Sim 2014-01-03 14:20:51 UTC
Issue in comment #4 fixed upstream by https://svn.apache.org/r1555106

Comment 6 Irina Boverman 2014-01-03 15:28:47 UTC
Added 1555106 to 0.22-mrg.

Comment 7 Petr Matousek 2014-01-06 13:51:14 UTC
Both the original issue and the issue from comment 4 has been fixed. Verified on RHEL6.5 (i386, x86_64)


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

-> VERIFIED


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