consumer连接属性处理、联系更新

This commit is contained in:
许晓东
2022-07-07 20:09:27 +08:00
parent 458e13c9e0
commit 9c3e3988e0
2 changed files with 2 additions and 1 deletions

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 205 KiB

View File

@@ -63,6 +63,7 @@ class KafkaConsole(config: KafkaConfig) {
case er: Exception => eh(er)
}
finally {
ConsumerCache.clearProperties()
if (!config.isCacheConsumerConnection) {
consumer.close()
}
@@ -252,7 +253,7 @@ object ConsumerCache {
threadLocal.set(props)
}
def clear() : Unit = {
def clearProperties() : Unit = {
threadLocal.remove()
}
}