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

Rob Godfrey resolved QPID-6779.
-------------------------------
       Resolution: Fixed
    Fix Version/s: qpid-java-6.2

> [Java Broker] Refactor consumer closing functionality to make it consistent 
> between different protocols
> -------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-6779
>                 URL: https://issues.apache.org/jira/browse/QPID-6779
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>    Affects Versions: qpid-java-6.0
>            Reporter: Alex Rudyy
>             Fix For: qpid-java-6.2
>
>
> At the moment subscription cancellation is implemented differently on 
> supported protocols. For example,
> # AMQP 0-9 closes ConsumerImpl first (and when the last QueueConsumer is 
> closed ConsumerTarget is get closed) 
> # AMQP 0-10 closes ConsumerTarget (ConsumerImpl are listening for 
> ConsumerTarget state change and closed on hearing transition into CLOSED 
> state)
> # AMQP 1-0 closes ConsumerImpl first (and when the last QueueConsumer is 
> closed ConsumerTarget is get closed) 
> IMHO, we need to make subscription cancellation functionality consistent on 
> different protocol and simplify the implementation.
> I suspect that closing of all ConsumerImpl might result in timeouts on 
> subscription cancellation when configuration thread is busy with performing 
> various tasks as ConsumerImpl#close() would block and wait until 
> QueueConsumerImpl are get closed in config thread.
> It looks like ConsumerTarget#close should be invoked on subscription 
> cancellation and as part of ConsumerTarget#close all existing ConsumerImpl 
> should be closed explicitly rather then rely on ConsumerTarget state change 
> listeners. That should make implementation easier to understand and maintain. 
> All QueueConsumerImpl (configured objects) should be closed asynchronously as 
> part ConsumerImpl close.  
> Aside, we might want to rename classes and interfaces for consumers. We have 
> too many confusing names at the moment:
> * org.apache.qpid.server.model.Consumer (interface)
> * org.apache.qpid.server.consumer.ConsumerImpl (interface!!!!)
> * org.apache.qpid.server.virtualhost.AbstractSystemMessageSource.Consumer 
> (class !!!! implementing interface ConsumerImpl )
> * org.apache.qpid.server.queue.QueueConsumerImpl (class !!!!)
> * more...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to