You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <qp...@incubator.apache.org> on 2007/12/12 12:44:43 UTC

[jira] Closed: (QPID-185) Amend Java Broker handling of ifUnused & ifEmpty flags

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

Rob Godfrey closed QPID-185.
----------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: M3)

> Amend Java Broker handling of ifUnused & ifEmpty flags
> ------------------------------------------------------
>
>                 Key: QPID-185
>                 URL: https://issues.apache.org/jira/browse/QPID-185
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: M1, M2
>            Reporter: Marnie McCormack
>
> The java broker will send the correct channel exception for an unknown queue but does not yet do so for the ifUnused (or ifEmpty) flags (queues are also removed from store regardless of these flags). This needs to be amended.
> This JIRA raised as a result of an email discussion between Gordon and Rajith (Unsubscribing from a topic, Dec 8th) - more detail below:
> Rajith Attapattu wrote:
> > As part of the spec we need to throw
> > javax.jms.InvalidDestinationExceptionis the name supplied in the
> > unsubscribe method is not valid.
> > So in order to detect that
> [...]
> > I prefer the first approach as we also need to throw an exception if this
> > topic (queue in topic exchange) has active consumers bound to it.
> > Here is the method in question. (I have also cut/paste the section from the
> > java doc)
> >
> > public void unsubscribe(String name) throws JMSException
> >    {
> >        checkNotClosed();
> >
> >        //send a queue.delete for the subscription
> >        String queue = _connection.getClientID() + ":" + name;
> >        AMQFrame frame = QueueDeleteBody.createAMQFrame(_channelId, 0,
> > queue, false, false, true);
> >        _connection.getProtocolHandler().writeFrame(frame);
> >    }
> You can use the 'ifUnused' flag (the first boolean field, occurring
> after queue) to prevent deletion if there are consumers active. However,
> as with all errors in AMQP, this results in the channel being closed.
> The same would happen if the queue name does not exist.
> To avoid the pain of having to recreate all the state of the current
> channel, it might be better to have a separate channel for this purpose.
> The java broker will send the correct channel exception for an unknown
> queue but does not yet do so for the ifUnused (or ifEmpty) flags (queues
> are also removed from store regardless of these flags). The c++ broker
> does currently support these flags and there are tests in the python
> test suite for this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.