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)
|
case er: Exception => eh(er)
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
ConsumerCache.clearProperties()
|
||||||
if (!config.isCacheConsumerConnection) {
|
if (!config.isCacheConsumerConnection) {
|
||||||
consumer.close()
|
consumer.close()
|
||||||
}
|
}
|
||||||
@@ -252,7 +253,7 @@ object ConsumerCache {
|
|||||||
threadLocal.set(props)
|
threadLocal.set(props)
|
||||||
}
|
}
|
||||||
|
|
||||||
def clear() : Unit = {
|
def clearProperties() : Unit = {
|
||||||
threadLocal.remove()
|
threadLocal.remove()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user