This commit is contained in:
lxy
2020-09-07 22:11:29 +08:00
parent f848c57e39
commit 8d22d5e830
2 changed files with 12 additions and 1 deletions

View File

@@ -15,7 +15,11 @@ public class MyConsumer extends KafakConsumer {
addEventType(
EventType.of("a1", new TypeToken<Float>() {
}, r -> {
System.out.println("我收到了消息 主题A 事件:" + JsonConvert.root().convertTo(r));
System.out.println("我收到了消息 主题a1 事件:" + JsonConvert.root().convertTo(r));
}),
EventType.of("bx", str -> {
System.out.println("我收到了消息 主题bx 事件:" + str);
})
);
}