Skip to content

Commit

Permalink
Remove KAFKA. 3.0.53
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Oct 3, 2019
1 parent bb3e8a4 commit 5d17bb8
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 3,358 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ Please select according to languages:

### V3 changes

* v3.0, 2019-10-03, Remove KAFKA. 3.0.53
* v3.0, 2019-05-14, Covert Kernel File reader/writer. 3.0.52
* v3.0, 2019-04-30, Refine typo in files. 3.0.51
* v3.0, 2019-04-25, Upgrade http-parser from 2.1 to 2.9.2 and cover it. 3.0.50
Expand Down Expand Up @@ -710,7 +711,6 @@ Comparing with other media servers, SRS is much better and stronger, for details
| Reload | Stable | X | X | X | X |
| Forward | Stable | X | X | X | X |
| ATC | Stable | X | X | X | X |
| KAFKA | Experiment| X | X | X | X |

#### Stream Service

Expand Down
21 changes: 0 additions & 21 deletions trunk/auto/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ help=no
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=YES
SRS_UTEST=YES
Expand Down Expand Up @@ -117,7 +116,6 @@ Options:
--with-hds enable hds streaming, mux RTMP to F4M/F4V files.
--with-nginx enable delivery HTTP stream with nginx.
--with-stream-caster enable stream caster to serve other stream over other protocol.
--with-kafka enable srs kafka producer to report to kafka.
--with-ffmpeg enable transcoding tool ffmpeg.
--with-transcode enable transcoding features.
--with-ingest enable ingest features.
Expand All @@ -138,7 +136,6 @@ Options:
--without-hds disable hds, the adobe http dynamic streaming.
--without-nginx disable delivery HTTP stream with nginx.
--without-stream-caster disable stream caster, only listen and serve RTMP/HTTP.
--without-kafka disable the srs kafka producer.
--without-ffmpeg disable the ffmpeg transcode tool feature.
--without-transcode disable the transcoding feature.
--without-ingest disable the ingest feature.
Expand Down Expand Up @@ -230,7 +227,6 @@ function parse_user_option() {
--with-ingest) SRS_INGEST=YES ;;
--with-stat) SRS_STAT=YES ;;
--with-stream-caster) SRS_STREAM_CASTER=YES ;;
--with-kafka) SRS_KAFKA=YES ;;
--with-librtmp) SRS_LIBRTMP=YES ;;
--with-research) SRS_RESEARCH=YES ;;
--with-utest) SRS_UTEST=YES ;;
Expand All @@ -251,7 +247,6 @@ function parse_user_option() {
--without-ingest) SRS_INGEST=NO ;;
--without-stat) SRS_STAT=NO ;;
--without-stream-caster) SRS_STREAM_CASTER=NO ;;
--without-kafka) SRS_KAFKA=NO ;;
--without-librtmp) SRS_LIBRTMP=NO ;;
--without-research) SRS_RESEARCH=NO ;;
--without-utest) SRS_UTEST=NO ;;
Expand Down Expand Up @@ -387,7 +382,6 @@ function apply_user_presets() {
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -399,7 +393,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=YES
SRS_FFMPEG_TOOL=YES
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=YES
SRS_UTEST=YES
Expand All @@ -411,7 +404,6 @@ function apply_user_presets() {
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -423,7 +415,6 @@ function apply_user_presets() {
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -435,7 +426,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -448,7 +438,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -460,7 +449,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
Expand All @@ -472,7 +460,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
Expand All @@ -487,7 +474,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=YES
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=YES
SRS_UTEST=YES
Expand All @@ -499,7 +485,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=YES
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -511,7 +496,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=YES
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
Expand All @@ -523,7 +507,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand All @@ -535,7 +518,6 @@ function apply_user_presets() {
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=YES
SRS_KAFKA=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=NO
Expand Down Expand Up @@ -595,7 +577,6 @@ function apply_user_detail_options() {
SRS_INGEST=NO
SRS_STAT=NO
SRS_STREAM_CASTER=NO
SRS_KAFKA=NO
SRS_LIBRTMP=YES
SRS_RESEARCH=YES
SRS_UTEST=NO
Expand Down Expand Up @@ -627,7 +608,6 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-callback"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-callback"; fi
if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-server"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-server"; fi
if [ $SRS_STREAM_CASTER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-stream-caster"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-stream-caster"; fi
if [ $SRS_KAFKA = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-kafka"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-kafka"; fi
if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-api"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-api"; fi
if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi
if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi
Expand Down Expand Up @@ -713,7 +693,6 @@ function check_option_conflicts() {
if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_FFMPEG_TOOL = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_STREAM_CASTER = RESERVED ]; then echo "you must specifies the stream-caster, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_KAFKA = RESERVED ]; then echo "you must specifies the kafka, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_UTEST = RESERVED ]; then echo "you must specifies the utest, see: ./configure --help"; __check_ok=NO; fi
Expand Down
9 changes: 2 additions & 7 deletions trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot})
MODULE_FILES=("srs_protocol_amf0" "srs_protocol_io" "srs_rtmp_stack"
"srs_rtmp_handshake" "srs_protocol_utility" "srs_rtmp_msg_array" "srs_protocol_stream"
"srs_raw_avc" "srs_rtsp_stack" "srs_http_stack" "srs_protocol_kbps" "srs_protocol_json"
"srs_kafka_stack" "srs_protocol_format")
"srs_protocol_format")
PROTOCOL_INCS="src/protocol"; MODULE_DIR=${PROTOCOL_INCS} . auto/modules.sh
PROTOCOL_OBJS="${MODULE_OBJS[@]}"
#
Expand Down Expand Up @@ -225,7 +225,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
"srs_app_heartbeat" "srs_app_empty" "srs_app_http_client" "srs_app_http_static"
"srs_app_recv_thread" "srs_app_security" "srs_app_statistic" "srs_app_hds"
"srs_app_mpegts_udp" "srs_app_rtsp" "srs_app_listener" "srs_app_async_call"
"srs_app_caster_flv" "srs_app_process" "srs_app_ng_exec" "srs_app_kafka"
"srs_app_caster_flv" "srs_app_process" "srs_app_ng_exec"
"srs_app_hourglass" "srs_app_dash" "srs_app_fragment" "srs_app_dvr"
"srs_app_coworkers")
DEFINES=""
Expand Down Expand Up @@ -577,11 +577,6 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
else
echo -e "${GREEN}Note: StreamCaster is disabled.${BLACK}"
fi
if [ $SRS_KAFKA = YES ]; then
echo -e "${GREEN}Kafka is enabled.${BLACK}"
else
echo -e "${YELLOW}Warning: Kafka is disabled.${BLACK}"
fi
if [ $SRS_HDS = YES ]; then
echo -e "${YELLOW}Experiment: HDS is enabled.${BLACK}"
else
Expand Down
74 changes: 1 addition & 73 deletions trunk/src/app/srs_app_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,6 @@ srs_error_t SrsConfig::reload_conf(SrsConfig* conf)
}

// TODO: FIXME: support reload stream_caster.
// TODO: FIXME: support reload kafka.

// merge config: vhost
if ((err = reload_vhost(old_root)) != srs_success) {
Expand Down Expand Up @@ -2139,19 +2138,6 @@ srs_error_t SrsConfig::global_to_json(SrsJsonObject* obj)
}
}
obj->set(dir->name, sobj);
} else if (dir->name == "kafka") {
SrsJsonObject* sobj = SrsJsonAny::object();
for (int j = 0; j < (int)dir->directives.size(); j++) {
SrsConfDirective* sdir = dir->directives.at(j);
if (sdir->name == "enabled") {
sobj->set(sdir->name, sdir->dumps_arg0_to_boolean());
} else if (sdir->name == "brokers") {
sobj->set(sdir->name, sdir->dumps_args());
} else if (sdir->name == "topic") {
sobj->set(sdir->name, sdir->dumps_arg0_to_str());
}
}
obj->set(dir->name, sobj);
} else if (dir->name == "stream_caster") {
SrsJsonObject* sobj = SrsJsonAny::object();
for (int j = 0; j < (int)dir->directives.size(); j++) {
Expand Down Expand Up @@ -3511,7 +3497,7 @@ srs_error_t SrsConfig::check_normal_config()
&& n != "srs_log_tank" && n != "srs_log_level" && n != "srs_log_file"
&& n != "max_connections" && n != "daemon" && n != "heartbeat"
&& n != "http_api" && n != "stats" && n != "vhost" && n != "pithy_print_ms"
&& n != "http_server" && n != "stream_caster" && n != "kafka"
&& n != "http_server" && n != "stream_caster"
&& n != "utc_time" && n != "work_dir" && n != "asprocess"
) {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal directive %s", n.c_str());
Expand Down Expand Up @@ -3545,15 +3531,6 @@ srs_error_t SrsConfig::check_normal_config()
}
}
}
if (true) {
SrsConfDirective* conf = root->get("kafka");
for (int i = 0; conf && i < (int)conf->directives.size(); i++) {
string n = conf->at(i)->name;
if (n != "enabled" && n != "brokers" && n != "topic") {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal kafka.%s", n.c_str());
}
}
}
if (true) {
SrsConfDirective* conf = get_heartbeart();
for (int i = 0; conf && i < (int)conf->directives.size(); i++) {
Expand Down Expand Up @@ -4208,55 +4185,6 @@ int SrsConfig::get_stream_caster_rtp_port_max(SrsConfDirective* conf)
return ::atoi(conf->arg0().c_str());
}

bool SrsConfig::get_kafka_enabled()
{
static bool DEFAULT = false;

SrsConfDirective* conf = root->get("kafka");
if (!conf) {
return DEFAULT;
}

conf = conf->get("enabled");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}

return SRS_CONF_PERFER_FALSE(conf->arg0());
}

SrsConfDirective* SrsConfig::get_kafka_brokers()
{
SrsConfDirective* conf = root->get("kafka");
if (!conf) {
return NULL;
}

conf = conf->get("brokers");
if (!conf || conf->args.empty()) {
return NULL;
}

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);
Expand Down
8 changes: 0 additions & 8 deletions trunk/src/app/srs_app_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,6 @@ class SrsConfig
virtual int get_stream_caster_rtp_port_min(SrsConfDirective* conf);
// Get the max udp port for rtp of stream caster rtsp.
virtual int get_stream_caster_rtp_port_max(SrsConfDirective* conf);
// kafka section.
public:
// Whether the kafka enabled.
virtual bool get_kafka_enabled();
// Get the broker list, each is format in <ip:port>.
virtual SrsConfDirective* get_kafka_brokers();
// Get the kafka topic to use for srs.
virtual std::string get_kafka_topic();
// vhost specified section
public:
// Get the vhost directive by vhost name.
Expand Down
Loading

1 comment on commit 5d17bb8

@winlinvip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.