15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ACK_HANDLER_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ACK_HANDLER_H
18#include "google/cloud/pubsub/version.h"
19#include "google/cloud/status.h"
26GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
57
58
59
60
61
62
63
64
65
67 auto impl = std::move(impl_);
72
73
74
75
76
77
78
79
80
82 auto impl = std::move(impl_);
97 virtual void nack() {}
103
104
105 explicit AckHandler(std::unique_ptr<
Impl> impl) : impl_(std::move(impl)) {}
108 std::unique_ptr<
Impl> impl_;
111GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Allow applications to mock an AckHandler.
Definition: ack_handler.h:91
virtual void nack()
The implementation for AckHandler::nack()
Definition: ack_handler.h:97
virtual void ack()
The implementation for AckHandler::ack()
Definition: ack_handler.h:95
virtual std::int32_t delivery_attempt() const
The implementation for AckHandler::delivery_attempt()
Definition: ack_handler.h:99
Defines the interface to acknowledge and reject messages.
Definition: ack_handler.h:49
AckHandler(AckHandler &&)=default
void nack() &&
Rejects the message associated with this handler.
Definition: ack_handler.h:81
AckHandler(std::unique_ptr< Impl > impl)
Applications may use this constructor in their mocks.
Definition: ack_handler.h:105
void ack() &&
Acknowledges the message associated with this handler.
Definition: ack_handler.h:66
AckHandler & operator=(AckHandler &&)=default
std::int32_t delivery_attempt() const
Returns the approximate number of times that Cloud Pub/Sub has attempted to deliver the associated me...
Definition: ack_handler.h:88
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.