Class ConsumerFlowStrategy.CreditEveryNthChunkConsumerFlowStrategy

java.lang.Object
com.rabbitmq.stream.ConsumerFlowStrategy.CreditEveryNthChunkConsumerFlowStrategy
All Implemented Interfaces:
ConsumerFlowStrategy
Enclosing interface:
ConsumerFlowStrategy

public static final class ConsumerFlowStrategy.CreditEveryNthChunkConsumerFlowStrategy extends Object implements ConsumerFlowStrategy
Strategy that provides the specified number of initial credits and n credits every n chunks.

This strategy can improve throughput for some workloads, it is possible to experiment with it if hitting problems with other flow strategies.

The number of initial credits must be at least twice as big as n.

Calls to MessageHandler.Context.processed() are ignored.