mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add producer api messages.
This commit is contained in:
parent
7a0aaf5900
commit
8e344f1c26
5 changed files with 403 additions and 11 deletions
|
|
@ -45,6 +45,11 @@ class SrsKafkaProducer;
|
|||
|
||||
#ifdef SRS_AUTO_KAFKA
|
||||
|
||||
/**
|
||||
* the partition messages cache.
|
||||
*/
|
||||
typedef std::vector<SrsJsonObject*> SrsKafkaPartitionCache;
|
||||
|
||||
/**
|
||||
* the kafka partition info.
|
||||
*/
|
||||
|
|
@ -56,6 +61,7 @@ private:
|
|||
SrsKafkaClient* kafka;
|
||||
public:
|
||||
int id;
|
||||
std::string topic;
|
||||
// leader.
|
||||
int broker;
|
||||
std::string host;
|
||||
|
|
@ -66,6 +72,7 @@ public:
|
|||
public:
|
||||
virtual std::string hostport();
|
||||
virtual int connect();
|
||||
virtual int flush(SrsKafkaPartitionCache* pc);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -94,11 +101,6 @@ public:
|
|||
virtual std::string to_string();
|
||||
};
|
||||
|
||||
/**
|
||||
* the partition messages cache.
|
||||
*/
|
||||
typedef std::vector<SrsJsonObject*> SrsKafkaPartitionCache;
|
||||
|
||||
/**
|
||||
* a message cache for kafka.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue