Skip to content

Commit

Permalink
Merge pull request #884 from eeff/eeff/2.2
Browse files Browse the repository at this point in the history
Pick to 2.2: enlarge ekuiper plugin send/recv queue length
  • Loading branch information
fengzeroz authored Nov 3, 2022
2 parents 3773949 + 88d1de4 commit 7622f19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions plugins/ekuiper/plugin_ekuiper.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ static int ekuiper_plugin_start(neu_plugin_t *plugin)

nng_pipe_notify(plugin->sock, NNG_PIPE_EV_ADD_POST, pipe_add_cb, plugin);
nng_pipe_notify(plugin->sock, NNG_PIPE_EV_REM_POST, pipe_rm_cb, plugin);
nng_socket_set_int(plugin->sock, NNG_OPT_SENDBUF, 2048);
nng_socket_set_int(plugin->sock, NNG_OPT_RECVBUF, 2048);

if ((rv = nng_listen(plugin->sock, EKUIPER_PLUGIN_URL, NULL, 0)) != 0) {
plog_error(plugin, "nng_listen: %s", nng_strerror(rv));
Expand Down
2 changes: 1 addition & 1 deletion plugins/ekuiper/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void send_data(neu_plugin_t *plugin, neu_reqresp_trans_data_t *trans_data)
rv = nng_sendmsg(plugin->sock, msg,
NNG_FLAG_NONBLOCK); // TODO: use aio to send message
if (0 != rv) {
plog_error(plugin, "nng cannot send msg");
plog_error(plugin, "nng cannot send msg: %s", nng_strerror(rv));
nng_msg_free(msg);
}
}
Expand Down

0 comments on commit 7622f19

Please sign in to comment.