Package org.acemq.workloads.scenario
Class ConsumerGroupNode
java.lang.Object
org.acemq.workloads.scenario.ConsumerGroupNode
- All Implemented Interfaces:
Node
The consumers on one queue.
Switching this off is not the same as removing it: the queue keeps filling and the run measures what a backlog costs, which is usually the question somebody had.
-
Method Summary
Modifier and TypeMethodDescriptionintconcurrency(int concurrency) enabled(boolean enabled) doublefailureRate(double fraction) handlerTime(Duration handlerTime) booleanname()none()intprefetch()prefetch(int prefetch) How many unacknowledged messages each consumer may hold.toString()
-
Method Details
-
concurrency
- Parameters:
concurrency- how many consumers on this queue- Returns:
- this group
-
prefetch
How many unacknowledged messages each consumer may hold.The number most often wrong in production, in both directions: too low and a consumer waits a round trip between messages; too high and one consumer takes work it cannot get through while others idle. Measuring is the only way to know which side you are on.
- Parameters:
prefetch- the window- Returns:
- this group
-
handlerTime
- Parameters:
handlerTime- how long the handler pretends to work for- Returns:
- this group
-
failureRate
- Parameters:
fraction- how often the handler throws, from 0 to 1- Returns:
- this group
-
enabled
- Parameters:
enabled- whether these consumers run- Returns:
- this group
-
none
- Returns:
- this group, switched off, so the queue grows
-
name
-
queueName
- Returns:
- the queue these consumers read
-
concurrency
public int concurrency() -
prefetch
public int prefetch() -
handlerTime
-
failureRate
public double failureRate() -
isEnabled
public boolean isEnabled() -
toString
-