15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_CONNECTION_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_CONNECTION_H
18#include "google/cloud/pubsub/backoff_policy.h"
19#include "google/cloud/pubsub/connection_options.h"
20#include "google/cloud/pubsub/internal/publisher_stub.h"
21#include "google/cloud/pubsub/message.h"
22#include "google/cloud/pubsub/publisher_options.h"
23#include "google/cloud/pubsub/retry_policy.h"
24#include "google/cloud/pubsub/topic.h"
25#include "google/cloud/pubsub/version.h"
26#include "google/cloud/future.h"
27#include "google/cloud/internal/non_constructible.h"
28#include "google/cloud/status_or.h"
29#include <initializer_list>
36GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
84
85
86
87
88
89
90
91
92GOOGLE_CLOUD_CPP_DEPRECATED(
"use `MakePublisherConnection(topic)` instead")
94 Topic topic, std::initializer_list<internal::NonConstructible>);
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
126
127
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
156GOOGLE_CLOUD_CPP_DEPRECATED(
157 "use the overload consuming google::cloud::Options instead")
160 ConnectionOptions connection_options
= {},
161 std::unique_ptr<RetryPolicy
const> retry_policy = {},
162 std::unique_ptr<BackoffPolicy
const> backoff_policy = {});
164GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
167namespace pubsub_internal {
168GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
172 std::vector<std::shared_ptr<PublisherStub>> stubs);
174GOOGLE_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 ~PublisherConnection()=0
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
Objects of this class identify a Cloud Pub/Sub topic.
Definition: topic.h:37
Contains all the Cloud Pub/Sub C++ client types and functions.
Definition: ack_handler.h:25
std::shared_ptr< PublisherConnection > MakePublisherConnection(Topic topic, Options opts={})
Creates a new PublisherConnection object to work with Publisher.
std::shared_ptr< PublisherConnection > MakePublisherConnection(Topic topic, PublisherOptions options, ConnectionOptions connection_options={}, std::unique_ptr< RetryPolicy const > retry_policy={}, std::unique_ptr< BackoffPolicy const > backoff_policy={})
Creates a new PublisherConnection object to work with Publisher.
std::shared_ptr< PublisherConnection > MakePublisherConnection(Topic topic, std::initializer_list< internal::NonConstructible >)
Creates a new PublisherConnection object to work with Publisher.
The namespace Google Cloud Platform C++ client libraries.
Wrap the arguments for Flush()
Definition: publisher_connection.h:66
Wrap the arguments for Publish()
Definition: publisher_connection.h:61
Message message
Definition: publisher_connection.h:62
Wrap the arguments for ResumePublish()
Definition: publisher_connection.h:69
std::string ordering_key
Definition: publisher_connection.h:70