public class PubSubAcknowledgmentCallback extends Object implements org.springframework.integration.acks.AcknowledgmentCallback
AcknowledgmentCallback
.
AcknowledgmentCallback.isAcknowledged()
is implemented for semantic accuracy only,
since in Pub/Sub acknowledging a message more than once is not an error.
AcknowledgmentCallback.noAutoAck()
is not implemented; the correct way to enable
manual acking is through configuring PubSubMessageSource
.
Constructor and Description |
---|
PubSubAcknowledgmentCallback(AcknowledgeablePubsubMessage message,
AckMode ackMode)
Instantiates a callback for a given message and acknowledgement mode.
|
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(org.springframework.integration.acks.AcknowledgmentCallback.Status status)
In
AckMode.AUTO_ACK mode, nacking cannot be done through this callback. |
boolean |
isAcknowledged() |
boolean |
isAutoAck() |
public PubSubAcknowledgmentCallback(AcknowledgeablePubsubMessage message, AckMode ackMode)
message
- message to acknowledgeackMode
- whether to ack and/or nack automaticallypublic void acknowledge(org.springframework.integration.acks.AcknowledgmentCallback.Status status)
AckMode.AUTO_ACK
mode, nacking cannot be done through this callback.
Use GcpPubSubHeaders.ORIGINAL_MESSAGE
to nack
instead.
acknowledge
in interface org.springframework.integration.acks.AcknowledgmentCallback
public boolean isAutoAck()
isAutoAck
in interface org.springframework.integration.acks.AcknowledgmentCallback
public boolean isAcknowledged()
isAcknowledged
in interface org.springframework.integration.acks.AcknowledgmentCallback
Copyright © 2022. All rights reserved.