1
0
Fork 0
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:
winlin 2015-10-15 17:45:58 +08:00
parent a9fdb630d9
commit 8974fe298b
8 changed files with 151 additions and 11 deletions

View file

@ -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);