[ 
https://issues.apache.org/jira/browse/QPID-8569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pete Fawcett updated QPID-8569:
-------------------------------
    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

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|https://github.com/apache/qpid-proton/blob/main/cpp/examples/selected_recv.cpp#L65|]





  was:
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

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](https://github.com/apache/qpid-proton/blob/main/cpp/examples/selected_recv.cpp#L65)






> Illegal selector results in undeletable queue
> ---------------------------------------------
>
>                 Key: QPID-8569
>                 URL: https://issues.apache.org/jira/browse/QPID-8569
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: qpid-cpp-1.39.0
>            Reporter: Pete Fawcett
>            Priority: Major
>
> 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
> 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|https://github.com/apache/qpid-proton/blob/main/cpp/examples/selected_recv.cpp#L65|]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to