Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
Loading...
Searching...
No Matches
pull_response.h
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PULL_RESPONSE_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PULL_RESPONSE_H
17
18#include "google/cloud/pubsub/message.h"
19#include "google/cloud/pubsub/pull_ack_handler.h"
20#include "google/cloud/pubsub/version.h"
21
22namespace google {
23namespace cloud {
24namespace pubsub {
25GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
26
27/**
28 * The response for a blocking pull.
29 *
30 * If the application invokes `handler.nack()` or allows `handler` to go out
31 * of scope, then the service will redeliver the message.
32 *
33 * With exactly-once delivery subscriptions, the service will stop
34 * redelivering the message once the application invokes `handler.ack()` and
35 * the invocation succeeds. With best-efforts subscriptions, the service *may*
36 * redeliver the message, even after a successful `handler.ack()` invocation.
37 *
38 * If `handler` is not an rvalue, you may need to use `std::move(handler).ack()`
39 * or `std::move(handler).nack()`.
40 *
41 * @see https://cloud.google.com/pubsub/docs/exactly-once-delivery
42 */
43struct PullResponse {
44 /// The ack/nack handler associated with this message.
46 /// The message attributes and payload.
48};
49
50GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
51} // namespace pubsub
52} // namespace cloud
53} // namespace google
54
55#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PULL_RESPONSE_H
The C++ representation for a Cloud Pub/Sub messages.
Definition: message.h:78
Defines the interface to acknowledge and reject messages.
Definition: pull_ack_handler.h:50
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.
The response for a blocking pull.
Definition: pull_response.h:43
pubsub::Message message
The message attributes and payload.
Definition: pull_response.h:47
pubsub::PullAckHandler handler
The ack/nack handler associated with this message.
Definition: pull_response.h:45