15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIBER_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIBER_H
18#include "google/cloud/pubsub/ack_handler.h"
19#include "google/cloud/pubsub/exactly_once_ack_handler.h"
20#include "google/cloud/pubsub/message.h"
21#include "google/cloud/pubsub/subscriber_connection.h"
22#include "google/cloud/pubsub/subscription.h"
23#include "google/cloud/pubsub/version.h"
24#include "google/cloud/status.h"
30GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
189GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
friend friend class future
A connection to the Cloud Pub/Sub service to receive events.
Definition: subscriber_connection.h:57
Receive messages from the Cloud Pub/Sub service.
Definition: subscriber.h:91
future< Status > Subscribe(ApplicationCallback cb, Options opts={})
Creates a new session to receive messages from subscription.
Subscriber(std::shared_ptr< SubscriberConnection > connection, Options opts={})
future< Status > Subscribe(ExactlyOnceApplicationCallback cb, Options opts={})
Creates a new session to receive messages from subscription using exactly-once delivery.
StatusOr< PullResponse > Pull(Options opts={})
Pulls one message from subscription.
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