consumer连接属性处理、联系更新
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 205 KiB |
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user