| librdkafka
    The Apache Kafka C/C++ client library | 
#include <rdkafkacpp.h>
| Public Types | |
| enum | Status { MSG_STATUS_NOT_PERSISTED = 0 , MSG_STATUS_POSSIBLY_PERSISTED = 1 , MSG_STATUS_PERSISTED = 2 } | 
| Message persistence status can be used by the application to find out if a produced message was persisted in the topic log.  More... | |
| Public Member Functions | |
| virtual std::string | errstr () const =0 | 
| Accessor functions*.  More... | |
| virtual ErrorCode | err () const =0 | 
| virtual Topic * | topic () const =0 | 
| virtual std::string | topic_name () const =0 | 
| virtual int32_t | partition () const =0 | 
| virtual void * | payload () const =0 | 
| virtual size_t | len () const =0 | 
| virtual const std::string * | key () const =0 | 
| virtual const void * | key_pointer () const =0 | 
| virtual size_t | key_len () const =0 | 
| virtual int64_t | offset () const =0 | 
| virtual MessageTimestamp | timestamp () const =0 | 
| virtual void * | msg_opaque () const =0 | 
| virtual int64_t | latency () const =0 | 
| virtual struct rd_kafka_message_s * | c_ptr ()=0 | 
| Returns the underlying librdkafka C rd_kafka_message_t handle.  More... | |
| virtual Status | status () const =0 | 
| Returns the message's persistence status in the topic log. | |
| virtual RdKafka::Headers * | headers ()=0 | 
| virtual RdKafka::Headers * | headers (RdKafka::ErrorCode *err)=0 | 
| virtual int32_t | broker_id () const =0 | 
| virtual int32_t | leader_epoch () const =0 | 
| virtual Error * | offset_store ()=0 | 
| Store offset +1 for the consumed message.  More... | |
Message object.
This object represents either a single consumed or produced message, or an event (err() is set).
An application must check RdKafka::Message::err() to see if the object is a proper message (error is RdKafka::ERR_NO_ERROR) or a an error event.
Message persistence status can be used by the application to find out if a produced message was persisted in the topic log.
| Enumerator | |
|---|---|
| MSG_STATUS_NOT_PERSISTED | Message was never transmitted to the broker, or failed with an error indicating it was not written to the log. Application retry risks ordering, but not duplication. | 
| MSG_STATUS_POSSIBLY_PERSISTED | Message was transmitted to broker, but no acknowledgement was received. Application retry risks ordering and duplication. | 
| MSG_STATUS_PERSISTED | Message was written to the log and fully acknowledged. No reason for application to retry. Note: this value should only be trusted with  | 
| 
 | pure virtual | 
Accessor functions*.
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
msg_opaque as provided to RdKafka::Producer::produce() | 
 | pure virtual | 
| 
 | pure virtual | 
Returns the underlying librdkafka C rd_kafka_message_t handle.
rd_kafka_message_t* | 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
| 
 | pure virtual | 
Store offset +1 for the consumed message.
The message offset + 1 will be committed to broker according to auto.commit.interval.ms
enable.auto.offset.store