class ProduceResponse

Header File: <libkafka_asio/produce_response.h>

Namespace: libkafka_asio

Implementation of the Kafka ProduceResponse as described on the Kafka wiki. An object of this type will be given as response object to the handler function when invoking a produce request and the request expected the server to send a response (which is not always the case for a ProduceRequest).

Member Functions

topics

const TopicVector& topics() const

Returns a reference to the list of topics, for which messages have been produced for. See the description of Topic type below.

Types

Topic

struct Topic
  • topic_name: Name of this topic.
  • partitions: Vector of Topic::Partition, representing the partitions, for which messages have been created.

Topic::Partition

struct Topic::Partition
  • partition: Number, identifying this topic partition.
  • error_code: Kafka error code for this partition, if any.
  • offset: Offset assigned to the first message in the set of messages produced for this partition.

TopicVector

typedef std::vector<Topic> TopicVector

Set of topics, messages have been produced for.

OptionalType

typedef boost::optional<ProduceResponse> OptionalType

A produce response object wrapped using Boost optional. Such an object will be used for produce request handler functions.