[ 
https://issues.apache.org/jira/browse/QPID-8389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16999362#comment-16999362
 ] 

Alex Rudyy commented on QPID-8389:
----------------------------------

Hi Rob,

I finally reviewed your changes. Please, find below my review comments.

* The terminology "live consumer" sounds a bit odd to me. In my mind, the 
"non-live" things cannot became "live". Thus, the transition from "non-live 
state" into "live state" is sort of impossible. I would prefer to rename the 
"live consumers" into "operational consumers" and "non live" into "non 
operational". The attribute name would be "maximumOperationalConsumers" and 
consumer attribute would "nonOperationalConsumer".
 Though, I can live with the term "live consumer", if you think that it is a 
better name :) I just think that meaning of "operational" is closer to the 
meaning of "active" which is an original term used on RabbitMQ broker.
* The changes in AbstractQueue to increment/decrement live consumer counter and 
assigning a new live consumer look good to me, though, I would suggest to 
extract code into separate methods like  incrementLiveConsumers, 
decreementLiveConsumers and assignNextLiveConsumer, as the methods  
"addConsumer" and "removeConsumer" were already huge  before adding the changes 
and the added changes made them bigger. This is not good from clean code 
perspective.
* I would use prefetch of "0" in the new test ( {{Connection connection = 
getConnectionBuilder().setSyncPublish(true).setPrefetch(0).build()}} ) to make 
sure that prefetch functionality does not interfere with "live consumers"
* Why {{Consumer#isNonLive()}} is not a derived attribute. I think that having 
it exposed as a derived attribute could be very useful.

> [Broker-J] Support the ability to limit the number of active consumers
> ----------------------------------------------------------------------
>
>                 Key: QPID-8389
>                 URL: https://issues.apache.org/jira/browse/QPID-8389
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Broker-J
>            Reporter: Robert Godfrey
>            Assignee: Robert Godfrey
>            Priority: Major
>             Fix For: qpid-java-broker-8.0.0
>
>
> RabbitMQ supports an extension to queue.declare to designate that the queue 
> will support only one "active" consumer, while keeping other consumers 
> connected to act as a fast failover (seeĀ 
> [https://www.rabbitmq.com/consumers.html#single-active-consumer]).
> We should add the ability for similar configuration to Broker-J



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to