15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_H
18#include "google/cloud/pubsub/connection_options.h"
19#include "google/cloud/pubsub/publisher_connection.h"
20#include "google/cloud/pubsub/publisher_options.h"
21#include "google/cloud/pubsub/version.h"
27GOOGLE_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
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
91
92
93
94
95
96
97
101 : connection_(std::move(connection)) {}
109 return a.connection_ == b.connection_;
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
145 return connection_->
Publish({std::move(m)}
);
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
190 GOOGLE_CLOUD_CPP_DEPRECATED(
"use `Publisher(connection)` instead")
199GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
friend friend class future
The C++ representation for a Cloud Pub/Sub messages.
Definition: message.h:78
A connection to the Cloud Pub/Sub service to publish events.
Definition: publisher_connection.h:56
virtual future< StatusOr< std::string > > Publish(PublishParams p)
Defines the interface for Publisher::Publish()
virtual void Flush(FlushParams)
Defines the interface for Publisher::Flush()
virtual void ResumePublish(ResumePublishParams p)
Defines the interface for Publisher::ResumePublish()
Configuration options for a Publisher.
Definition: publisher_options.h:64
Publish messages to the Cloud Pub/Sub service.
Definition: publisher.h:98
void Flush()
Forcibly publishes any batched messages.
Definition: publisher.h:165
void ResumePublish(std::string ordering_key)
Resumes publishing after an error.
Definition: publisher.h:184
Publisher(Publisher const &)=default
Publisher & operator=(Publisher &&)=default
Publisher(Publisher &&)=default
friend bool operator!=(Publisher const &a, Publisher const &b)
Definition: publisher.h:111
friend bool operator==(Publisher const &a, Publisher const &b)
Definition: publisher.h:108
future< StatusOr< std::string > > Publish(Message m)
Publishes a message to this publisher's topic.
Definition: publisher.h:144
Publisher(std::shared_ptr< PublisherConnection > connection)
Definition: publisher.h:100
Publisher(std::shared_ptr< PublisherConnection > connection, PublisherOptions const &)
Definition: publisher.h:191
Publisher & operator=(Publisher const &)=default
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
The namespace Google Cloud Platform C++ client libraries.