2.0.7表模式下如何订阅实时数据
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by reviewing the table-mode topic configuration passed to SubscriptionTableSessionBuilder and createTopic, then trace how SubscriptionTablePushConsumerBuilder and consumeListener are expected to receive rows written through IoTDB MQTT. Reproduce the setup with the shown database, table, and test_topic values; done means the consumer receives newly inserted real-time data.
Written by the indexing model from the issue text.
Description
`
// 创建 topics
try (final ISubscriptionTableSession session = new SubscriptionTableSessionBuilder()
.host(host)
.port(port)
.username(user)
.password(password)
.build())
{
final Properties config = new Properties();
config.put(TopicConstant.DATABASE_KEY, "酸奶");
config.put(TopicConstant.TABLE_KEY, "金山_产线_灌装_老酸奶灌装机");
config.put(TopicConstant.START_TIME_KEY, "now");
config.put(TopicConstant.STRICT_KEY, "true");
config.put(TopicConstant.MODE_KEY, TopicConstant.MODE_DEFAULT_VALUE);
session.createTopic("test_topic", config);
log.info("主题 {} 创建成功", "test_topic");
}
ThreadUtil.execute(() -> {
// 创建消费者
// push 模式
final ISubscriptionTablePushConsumer consumer = new SubscriptionTablePushConsumerBuilder()
.consumerId("c1").consumerGroupId("cg1")
.host(host).port(port)
.username(user).password("root")
.consumeListener(message -> {
System.out.println( message );
return ConsumeResult.SUCCESS;
})
.build();
try {
Thread.currentThread().join();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
});
`
以上代码中 我拿不到 实时数据。我的实时数据是通过iotdb 自带的 mqtt 写进去的。每次写进去 执行select 查询的时候已经查到新数据了。但是 这个订阅始终收不到数据。
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 284
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iotdb
-
[Bug] Python NumpyTablet silently drops trailing zero bytes from BLOB valuesPossibly taken @DaZuiZui claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] sbin/replace-conf-from-env.sh word-splits the whole environment and corrupts iotdb-system.propertiesPossibly taken @anishmehta24 claimed this 69 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/iotdb#18655 · 1 reaction ·
Maintainers usually reply within 1 day
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successPossibly taken @PDGGK claimed this 88 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column namePossibly taken @PDGGK claimed this 130 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Android Bug Core Drape
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
organicmaps/organicmaps#14449 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openhab/openhab-addons#22512 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/lints#1871 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/maven-war-plugin#694 ·
Maintainers usually reply within 1 day
-
help wanted maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/maven-resolver-ant-tasks#219 ·
Maintainers usually reply within 1 day