新增:topic 接收日志, zhub 消息发送日志
This commit is contained in:
parent
35e4bebb6d
commit
46082b5461
@ -203,6 +203,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
|
|||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
|
// topic msg
|
||||||
threadBuilder.accept(() -> {
|
threadBuilder.accept(() -> {
|
||||||
while (true) {
|
while (true) {
|
||||||
Event<String> event = null;
|
Event<String> event = null;
|
||||||
@ -210,7 +211,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
|
|||||||
if ((event = topicQueue.take()) == null) {
|
if ((event = topicQueue.take()) == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
logger.log(Level.INFO, "topic[" + event.topic + "] :" + event.value);
|
||||||
accept(event.topic, event.value);
|
accept(event.topic, event.value);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -265,6 +266,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
|
|||||||
if ((msg = sendMsgQueue.take()) == null) {
|
if ((msg = sendMsgQueue.take()) == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
logger.log(Level.FINEST, "send-msg: [" + msg + "]");
|
||||||
writer.write(msg.getBytes());
|
writer.write(msg.getBytes());
|
||||||
writer.flush();
|
writer.flush();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user