Class Message (2.12.0)

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
Name Description
Message const &

Message(Message &&)

Copy and move

Parameter
Name Description
Message &&

Operators

operator=(Message const &)

Copy and move

Parameter
Name Description
Message const &
Returns
Type Description
Message &

operator=(Message &&)

Copy and move

Parameter
Name Description
Message &&
Returns
Type Description
Message &

Functions

data() const &

accessors

Returns
Type Description
PubsubMessageDataType const &

data() &&

accessors

Returns
Type Description
PubsubMessageDataType &&

message_id() const

accessors

Returns
Type Description
std::string const &

ordering_key() const

accessors

Returns
Type Description
std::string const &

publish_time() const

accessors

Returns
Type Description
std::chrono::system_clock::time_point

attributes() const

accessors

Returns
Type Description
std::map< std::string, std::string >