Class ShareGroupAcknowledgement
java.lang.Object
io.smallrye.reactive.messaging.kafka.queues.ShareGroupAcknowledgement
Metadata for specifying the acknowledgment type when using Kafka Share Groups.
This metadata can be attached to a message when calling nack() to control
how the share group consumer should handle the rejected message.
-
Constructor Summary
ConstructorsConstructorDescriptionShareGroupAcknowledgement(org.apache.kafka.clients.consumer.AcknowledgeType acknowledgeType) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept()Accepts the message, indicating that it has been processed successfullystatic ShareGroupAcknowledgementfrom(org.apache.kafka.clients.consumer.AcknowledgeType acknowledgeType) Creates a ShareGroupAcknowledgeTypeMetadata with the specified acknowledge type.org.apache.kafka.clients.consumer.AcknowledgeTypevoidreject()Rejects the message, indicating that it should not be processed and should be discardedvoidrelease()Releases the message, indicating that it should be reprocessed by another consumer in the share group
-
Constructor Details
-
ShareGroupAcknowledgement
public ShareGroupAcknowledgement(org.apache.kafka.clients.consumer.AcknowledgeType acknowledgeType) -
ShareGroupAcknowledgement
public ShareGroupAcknowledgement()
-
-
Method Details
-
accept
public void accept()Accepts the message, indicating that it has been processed successfully -
release
public void release()Releases the message, indicating that it should be reprocessed by another consumer in the share group -
reject
public void reject()Rejects the message, indicating that it should not be processed and should be discarded -
from
public static ShareGroupAcknowledgement from(org.apache.kafka.clients.consumer.AcknowledgeType acknowledgeType) Creates a ShareGroupAcknowledgeTypeMetadata with the specified acknowledge type.- Parameters:
acknowledgeType- the acknowledgment type- Returns:
- the metadata instance
-
getAcknowledgeType
public org.apache.kafka.clients.consumer.AcknowledgeType getAcknowledgeType()
-