Class ThrottlingMessageReceiver
java.lang.Object
pl.allegro.tech.hermes.consumers.consumer.receiver.ThrottlingMessageReceiver
- All Implemented Interfaces:
MessageReceiver
-
Constructor Summary
ConstructorsConstructorDescriptionThrottlingMessageReceiver(MessageReceiver receiver, IdleTimeCalculator idleTimeCalculator, pl.allegro.tech.hermes.api.SubscriptionName subscriptionName, pl.allegro.tech.hermes.common.metric.MetricsFacade metrics) -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit(Set<SubscriptionPartitionOffset> offsets) pl.allegro.tech.hermes.common.kafka.offset.PartitionOffsetsmoveOffset(pl.allegro.tech.hermes.common.kafka.offset.PartitionOffsets offsets) next()Retrieves the next available message from the queue.voidstop()voidupdate(pl.allegro.tech.hermes.api.Subscription newSubscription)
-
Constructor Details
-
ThrottlingMessageReceiver
public ThrottlingMessageReceiver(MessageReceiver receiver, IdleTimeCalculator idleTimeCalculator, pl.allegro.tech.hermes.api.SubscriptionName subscriptionName, pl.allegro.tech.hermes.common.metric.MetricsFacade metrics)
-
-
Method Details
-
next
Description copied from interface:MessageReceiverRetrieves the next available message from the queue.Depending on the context, the returned
Optionalcan contain: -
commit
- Specified by:
commitin interfaceMessageReceiver
-
moveOffset
public pl.allegro.tech.hermes.common.kafka.offset.PartitionOffsets moveOffset(pl.allegro.tech.hermes.common.kafka.offset.PartitionOffsets offsets) - Specified by:
moveOffsetin interfaceMessageReceiver
-
getAssignedPartitions
- Specified by:
getAssignedPartitionsin interfaceMessageReceiver
-
stop
public void stop()- Specified by:
stopin interfaceMessageReceiver
-
update
public void update(pl.allegro.tech.hermes.api.Subscription newSubscription) - Specified by:
updatein interfaceMessageReceiver
-