mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
connect to kafka and send metadata request.
This commit is contained in:
parent
a9fdb630d9
commit
8974fe298b
8 changed files with 151 additions and 11 deletions
|
@ -4298,6 +4298,23 @@ SrsConfDirective* SrsConfig::get_kafka_brokers()
|
|||
return conf;
|
||||
}
|
||||
|
||||
string SrsConfig::get_kafka_topic()
|
||||
{
|
||||
static string DEFAULT = "srs";
|
||||
|
||||
SrsConfDirective* conf = root->get("kafka");
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("topic");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
return conf->arg0();
|
||||
}
|
||||
|
||||
SrsConfDirective* SrsConfig::get_vhost(string vhost, bool try_default_vhost)
|
||||
{
|
||||
srs_assert(root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue