Class FullBatchBackPressureHandler

java.lang.Object
io.awspring.cloud.sqs.listener.backpressure.FullBatchBackPressureHandler
All Implemented Interfaces:
BackPressureHandler, BatchAwareBackPressureHandler, IdentifiableContainerComponent

public class FullBatchBackPressureHandler extends Object implements BatchAwareBackPressureHandler, IdentifiableContainerComponent
Non-blocking BackPressureHandler implementation that ensures the exact batch size is requested.

If the amount of permits being requested is not equal to the batch size, permits will be limited to 0. For this limiting mechanism to work, the FullBatchBackPressureHandler must be used in combination with another BackPressureHandler and be the last one in the chain of the CompositeBackPressureHandler

This handler builds on the original SemaphoreBackPressureHandler, separating specific responsibilities into a more modular form and enabling composition with other handlers as part of an extensible backpressure strategy.

Since:
4.0.0
Author:
Loïc Rouchon, Tomaz Fernandes
See Also: