Bug 1249659 - not-allowed error while creating binding for a default topic node
Summary: not-allowed error while creating binding for a default topic node
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: Development
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-03 14:02 UTC by Petr Matousek
Modified: 2024-01-19 19:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 726695 0 medium CLOSED Unable to create bindings on already existing broker objects using addressing 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 730981 0 medium CLOSED Unable to create binding while sending messages on default exchange using addressing 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 870030 0 low NEW "not allowed" error while creating node binding for a default topic node 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 893591 0 low NEW Topic node type must be specified in order to create node/link binding 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1207365 0 medium NEW Unable to create bindings on already existing broker objects using addressing 2024-01-19 19:11:08 UTC

Internal Links: 726695 730981 870030 893591 1207365

Description Petr Matousek 2015-08-03 14:02:40 UTC
Description of problem:

When creating a binding from a default exchange to a queue (exchange is used in the address/as a target/) and the node type is specified in the address string the binding creation fails with the following exception:
qpid.messaging.exceptions.SessionError: not-allowed: Exchange names beginning with "amq." or "qpid." are reserved.

This is a regression. In the released versions of python-qpid, the binding was created with the same command (please see below).

Version-Release number of selected component (if applicable):
python-qpid-0.34-1

How reproducible:
100%

Steps to Reproduce:
1. qpid-config add queue q
2. ./spout  "amq.direct;{ create:always, node:{type: topic}, link: { x-bindings: [{queue:q}] } }"
3. The binding is not created and the following error appears: not-allowed: Exchange names beginning with "amq." or "qpid." are reserved.


Actual results:
The binding is not created and the following error appears: not-allowed: Exchange names beginning with "amq." or "qpid." are reserved.

Expected results:
No error message, binding between the exchange and the queue is created

Additional info:

python-qpid-0.34-1 (MRGM-3.2)
# qpid-config add queue q
# ./spout  "amq.direct;{ create:always, node:{type: topic}, link: { x-bindings: [{queue:q}] } }"
Traceback (most recent call last):
  File "./spout", line 107, in <module>
    snd = ssn.sender(addr)
  File "<string>", line 6, in sender
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 623, in sender
    sender._ewait(lambda: sender.linked)
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 853, in _ewait
    result = self.session._ewait(lambda: self.error or predicate(), timeout)
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 593, in _ewait
    self.check_error()
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 582, in check_error
    raise self.error
qpid.messaging.exceptions.SessionError: not-allowed: Exchange names beginning with "amq." or "qpid." are reserved. (exchange="amq.direct") (/builddir/build/BUILD/qpid-cpp-0.34/src/qpid/broker/SessionAdapter.cpp:85)(530)
# qpid-config -r queues q
Queue 'q'
    bind [q] => ''

python-qpid-0.30-6 (MRGM-3.1)
# qpid-config add queue q
# ./spout  "amq.direct;{ create:always, node:{type: topic}, link: { x-bindings: [{queue:'q'}] } }"
Message(properties={'spout-id': 'fccd8de4-aa3a-451f-a5a3-7c5320609109:0'}, content_type='text/plain')
# qpid-config -r queues q
Queue 'q'
    bind [q] => ''
    bind [] => amq.direct

The issue doesn't appear when the node type is not specified:
# ./spout  "amq.direct;{ create:always, link: { x-bindings: [{queue:'q'}] } }"
Message(properties={'spout-id': '5fee54d3-6e60-495e-95f5-da987868074b:0'}, content_type='text/plain')
# qpid-config -r queues q
Queue 'q'
    bind [q] => ''
    bind [] => amq.direct

creating binding from the queue (queue is used as the address, which is probably more proper use case) works also as expected:
# ./spout  "q;{ create:always, node: { type:queue }, link: { x-bindings: [{exchange:'amq.direct'}] } }"
Message(properties={'spout-id': '2cf8f8ff-c1db-419a-800a-6cba2705c9c6:0'}, content_type='text/plain')
# qpid-config -r queues q
Queue 'q'
    bind [q] => ''
    bind [] => amq.direct


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