未验证 提交 d2d3fc14 编写于 作者: H Haojun Liao 提交者: GitHub

Merge pull request #20700 from taosdata/fix/TS-2940

opti:disable set enable.heartbeat.background
...@@ -293,7 +293,6 @@ You configure the following parameters when creating a consumer: ...@@ -293,7 +293,6 @@ You configure the following parameters when creating a consumer:
| `auto.offset.reset` | enum | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) | | `auto.offset.reset` | enum | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) |
| `enable.auto.commit` | boolean | Commit automatically | Specify `true` or `false`. | | `enable.auto.commit` | boolean | Commit automatically | Specify `true` or `false`. |
| `auto.commit.interval.ms` | integer | Interval for automatic commits, in milliseconds | | `auto.commit.interval.ms` | integer | Interval for automatic commits, in milliseconds |
| `enable.heartbeat.background` | boolean | Backend heartbeat; if enabled, the consumer does not go offline even if it has not polled for a long time | |
| `experimental.snapshot.enable` | boolean | Specify whether to consume messages from the WAL or from TSBS | | | `experimental.snapshot.enable` | boolean | Specify whether to consume messages from the WAL or from TSBS | |
| `msg.with.table.name` | boolean | Specify whether to deserialize table names from messages | | `msg.with.table.name` | boolean | Specify whether to deserialize table names from messages |
...@@ -368,7 +367,6 @@ conf := &tmq.ConfigMap{ ...@@ -368,7 +367,6 @@ conf := &tmq.ConfigMap{
"td.connect.port": "6030", "td.connect.port": "6030",
"client.id": "test_tmq_c", "client.id": "test_tmq_c",
"enable.auto.commit": "false", "enable.auto.commit": "false",
"enable.heartbeat.background": "true",
"experimental.snapshot.enable": "true", "experimental.snapshot.enable": "true",
"msg.with.table.name": "true", "msg.with.table.name": "true",
} }
...@@ -418,7 +416,6 @@ Python programs use the following parameters: ...@@ -418,7 +416,6 @@ Python programs use the following parameters:
| `auto.commit.interval.ms` | string | Interval for automatic commits, in milliseconds | | | `auto.commit.interval.ms` | string | Interval for automatic commits, in milliseconds | |
| `auto.offset.reset` | string | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) | | `auto.offset.reset` | string | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) |
| `experimental.snapshot.enable` | string | Specify whether to consume messages from the WAL or from TSDB | Specify `true` or `false` | | `experimental.snapshot.enable` | string | Specify whether to consume messages from the WAL or from TSDB | Specify `true` or `false` |
| `enable.heartbeat.background` | string | Backend heartbeat; if enabled, the consumer does not go offline even if it has not polled for a long time | Specify `true` or `false` |
</TabItem> </TabItem>
......
...@@ -35,7 +35,6 @@ func main() { ...@@ -35,7 +35,6 @@ func main() {
"td.connect.port": "6030", "td.connect.port": "6030",
"client.id": "test_tmq_client", "client.id": "test_tmq_client",
"enable.auto.commit": "false", "enable.auto.commit": "false",
"enable.heartbeat.background": "true",
"experimental.snapshot.enable": "true", "experimental.snapshot.enable": "true",
"msg.with.table.name": "true", "msg.with.table.name": "true",
}) })
......
...@@ -291,7 +291,6 @@ CREATE TOPIC topic_name AS DATABASE db_name; ...@@ -291,7 +291,6 @@ CREATE TOPIC topic_name AS DATABASE db_name;
| `auto.offset.reset` | enum | 消费组订阅的初始位置 | 可选:`earliest`(default), `latest`, `none` | | `auto.offset.reset` | enum | 消费组订阅的初始位置 | 可选:`earliest`(default), `latest`, `none` |
| `enable.auto.commit` | boolean | 是否启用消费位点自动提交 | 合法值:`true`, `false`。 | | `enable.auto.commit` | boolean | 是否启用消费位点自动提交 | 合法值:`true`, `false`。 |
| `auto.commit.interval.ms` | integer | 以毫秒为单位的消费记录自动提交消费位点时间间 | 默认 5000 m | | `auto.commit.interval.ms` | integer | 以毫秒为单位的消费记录自动提交消费位点时间间 | 默认 5000 m |
| `enable.heartbeat.background` | boolean | 启用后台心跳,启用后即使长时间不 poll 消息也不会造成离线 | 默认开启 |
| `experimental.snapshot.enable` | boolean | 是否允许从 TSDB 消费数据 | 实验功能,默认关闭 | | `experimental.snapshot.enable` | boolean | 是否允许从 TSDB 消费数据 | 实验功能,默认关闭 |
| `msg.with.table.name` | boolean | 是否允许从消息中解析表名, 不适用于列订阅(列订阅时可将 tbname 作为列写入 subquery 语句) | | | `msg.with.table.name` | boolean | 是否允许从消息中解析表名, 不适用于列订阅(列订阅时可将 tbname 作为列写入 subquery 语句) | |
...@@ -366,7 +365,6 @@ conf := &tmq.ConfigMap{ ...@@ -366,7 +365,6 @@ conf := &tmq.ConfigMap{
"td.connect.port": "6030", "td.connect.port": "6030",
"client.id": "test_tmq_c", "client.id": "test_tmq_c",
"enable.auto.commit": "false", "enable.auto.commit": "false",
"enable.heartbeat.background": "true",
"experimental.snapshot.enable": "true", "experimental.snapshot.enable": "true",
"msg.with.table.name": "true", "msg.with.table.name": "true",
} }
...@@ -418,7 +416,6 @@ consumer = Consumer({"group.id": "local", "td.connect.ip": "127.0.0.1"}) ...@@ -418,7 +416,6 @@ consumer = Consumer({"group.id": "local", "td.connect.ip": "127.0.0.1"})
| `auto.commit.interval.ms` | string | 以毫秒为单位的自动提交时间间隔 | 默认值:5000 ms | | `auto.commit.interval.ms` | string | 以毫秒为单位的自动提交时间间隔 | 默认值:5000 ms |
| `auto.offset.reset` | string | 消费组订阅的初始位置 | 可选:`earliest`(default), `latest`, `none` | | `auto.offset.reset` | string | 消费组订阅的初始位置 | 可选:`earliest`(default), `latest`, `none` |
| `experimental.snapshot.enable` | string | 是否允许从 TSDB 消费数据 | 合法值:`true`, `false` | | `experimental.snapshot.enable` | string | 是否允许从 TSDB 消费数据 | 合法值:`true`, `false` |
| `enable.heartbeat.background` | string | 启用后台心跳,启用后即使长时间不 poll 消息也不会造成离线 | 合法值:`true`, `false` |
</TabItem> </TabItem>
......
...@@ -320,15 +320,16 @@ tmq_conf_res_t tmq_conf_set(tmq_conf_t* conf, const char* key, const char* value ...@@ -320,15 +320,16 @@ tmq_conf_res_t tmq_conf_set(tmq_conf_t* conf, const char* key, const char* value
} }
if (strcasecmp(key, "enable.heartbeat.background") == 0) { if (strcasecmp(key, "enable.heartbeat.background") == 0) {
if (strcasecmp(value, "true") == 0) { // if (strcasecmp(value, "true") == 0) {
conf->hbBgEnable = true; // conf->hbBgEnable = true;
return TMQ_CONF_OK; // return TMQ_CONF_OK;
} else if (strcasecmp(value, "false") == 0) { // } else if (strcasecmp(value, "false") == 0) {
conf->hbBgEnable = false; // conf->hbBgEnable = false;
return TMQ_CONF_OK; // return TMQ_CONF_OK;
} else { // } else {
tscError("the default value of enable.heartbeat.background is true, can not be seted");
return TMQ_CONF_INVALID; return TMQ_CONF_INVALID;
} // }
} }
if (strcasecmp(key, "td.connect.ip") == 0) { if (strcasecmp(key, "td.connect.ip") == 0) {
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
"auto.offset.reset": "earliest", "auto.offset.reset": "earliest",
"enable.auto.commit": "true", "enable.auto.commit": "true",
"auto.commit.interval.ms": 1000, "auto.commit.interval.ms": 1000,
"enable.heartbeat.background": "true",
"experimental.snapshot.enable": "true", "experimental.snapshot.enable": "true",
"msg.with.table.name": "false", "msg.with.table.name": "false",
"topic_list": [ "topic_list": [
......
...@@ -542,7 +542,6 @@ tmq_t* build_consumer() { ...@@ -542,7 +542,6 @@ tmq_t* build_consumer() {
tmq_conf_set(conf, "td.connect.pass", "taosdata"); tmq_conf_set(conf, "td.connect.pass", "taosdata");
tmq_conf_set(conf, "msg.with.table.name", "true"); tmq_conf_set(conf, "msg.with.table.name", "true");
tmq_conf_set(conf, "enable.auto.commit", "true"); tmq_conf_set(conf, "enable.auto.commit", "true");
tmq_conf_set(conf, "enable.heartbeat.background", "true");
if (g_conf.snapShot) { if (g_conf.snapShot) {
tmq_conf_set(conf, "experimental.snapshot.enable", "true"); tmq_conf_set(conf, "experimental.snapshot.enable", "true");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册