Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
qpid-cpp-1.39.0
-
None
Description
Using AMQP 1.0 and creating a receiver, with an exchange as a source, and specifying a selector.
If a valid selector is specified then, as expected, a queue is created. The queue name and properties can be seen using qpid-stat or similar. When the receiver is closed the queue disappears.
If an invalid selector is specified then, again as expected, an error is returned to the client.
The problem is that it appears that a queue has been created. A new queue can be seen using qpid-stat and, even though is shows it to be "auto-delete" it has not been deleted.
Furthermore, trying to delete the queue using qpid-config returns a "not-found: Delete failed. No such queue: ..." error.
I don't think all invalid selectors produce this situation, and I think that there is some variation depending on the client being used - which perhaps suggests some validation is being done at the client end. However, there are certain invalid selectors that produce this error in both Python and C++ client bindings,
Examples of invalid selector that produce errors are using an invalid operator:
"header=='value'" which produces an "Illegal selector: '=': expected literal or identifier"
or an invalid characters:
"\header='value'" which produces an "Found illegal character"
both the above result in the creation of an undeletable queue
(I realise that "\header" isn't a valid value. I came across this error when trying to add double-quotes around the property name and got the wrong number of backslashes)
A minimal way to reproduce these errors is to use the selected_recv.cpp example program in qpid-proton and change the filter string in line 65