qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Rudyy (JIRA)" <j...@apache.org>
Subject [jira] [Created] (QPID-6779) [Java Broker] Refactor consumer closing functionality to make it consistent between different protocols
Date Thu, 08 Oct 2015 10:43:26 GMT
Alex Rudyy created QPID-6779:
--------------------------------

             Summary: [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


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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message