Why does Kafka Streams enforce logging disabled for GlobalKTable state stores?

可紊 提交于 2021-01-27 14:50:27

问题


Why must a global table not have logging enabled in kafka?

code:

if (loggingEnabled) {
    throw new TopologyException("StateStore " + storeName + " for global table must not have logging enabled.");
}

When I am restarting my kafka application all the datastore in globalstore is getting clean. How could I can made it tolerance.


回答1:


GlobalKTables use their input topic to guarantee fault-tolerance. Thus, I am not sure what you mean by

When I am restarting my kafka application all the datastore in globalstore is getting clean.

As long as the input topic is correctly configured with log-compaction enabled, the GlobalKTable state will be recreated on startup even if you delete the state locally.

Enabling logging does not make sense because each KafkaStreams instance loads the whole GlobalKTable data (ie, the data is broadcasted to all instances). Changelog topics are designed for shareded state though using one topic-partition per shard. Thus, both concepts don't align but contradict each other.



来源:https://stackoverflow.com/questions/52707748/why-does-kafka-streams-enforce-logging-disabled-for-globalktable-state-stores

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!