Class AckReplyConsumerWithResponseImpl (1.123.1)

public class AckReplyConsumerWithResponseImpl implements AckReplyConsumerWithResponse

Inheritance

java.lang.Object > AckReplyConsumerWithResponseImpl

Constructors

AckReplyConsumerWithResponseImpl(SettableApiFuture<MessageDispatcher.AckReply> ackReplySettableApiFuture, SettableApiFuture<AckResponse> messageFuture)

public AckReplyConsumerWithResponseImpl(SettableApiFuture<MessageDispatcher.AckReply> ackReplySettableApiFuture, SettableApiFuture<AckResponse> messageFuture)
Parameters
NameDescription
ackReplySettableApiFutureSettableApiFuture<com.google.cloud.pubsub.v1.MessageDispatcher.AckReply>
messageFutureSettableApiFuture<AckResponse>

Methods

ack()

public ApiFuture<AckResponse> ack()

Acknowledges that the message has been successfully processed. The service will not send the message again.

A future representing the server response is returned

Returns
TypeDescription
ApiFuture<AckResponse>

nack()

public ApiFuture<AckResponse> nack()

Signals that the message has not been successfully processed. The service should resend the message.

A future representing the server response is returned

Returns
TypeDescription
ApiFuture<AckResponse>