Class Message (2.19.0-rc)

The C++ representation for a Cloud Pub/Sub messages.

Cloud Pub/Sub applications communicate to each other using messages. Note that messages must provide at least some data or some attributes. Use MessageBuilder to create instances of this class.

Constructors

Message(Message const &)

Copy and move

Parameter
NameDescription
Message const &

Message(Message &&)

Copy and move

Parameter
NameDescription
Message &&

Operators

operator=(Message const &)

Copy and move

Parameter
NameDescription
Message const &
Returns
TypeDescription
Message &

operator=(Message &&)

Copy and move

Parameter
NameDescription
Message &&
Returns
TypeDescription
Message &

Functions

data() const &

accessors

Returns
TypeDescription
PubsubMessageDataType const &

data() &&

accessors

Returns
TypeDescription
PubsubMessageDataType &&

message_id() const

accessors

Returns
TypeDescription
std::string const &

ordering_key() const

accessors

Returns
TypeDescription
std::string const &

publish_time() const

accessors

Returns
TypeDescription
std::chrono::system_clock::time_point

attributes() const

accessors

Returns
TypeDescription
std::map< std::string, std::string >