diff --git a/net/src/main/java/com/zfoo/net/anno/Task.java b/net/src/main/java/com/zfoo/net/anno/Task.java index d8781b615..36531fb47 100644 --- a/net/src/main/java/com/zfoo/net/anno/Task.java +++ b/net/src/main/java/com/zfoo/net/anno/Task.java @@ -20,6 +20,8 @@ public enum Task { TaskBus, + EventBus, + NettyIO, VirtualThread; diff --git a/net/src/main/java/com/zfoo/net/router/Router.java b/net/src/main/java/com/zfoo/net/router/Router.java index 1b4699fb2..283bdc159 100644 --- a/net/src/main/java/com/zfoo/net/router/Router.java +++ b/net/src/main/java/com/zfoo/net/router/Router.java @@ -186,6 +186,7 @@ public void dispatchByTaskExecutorHash(int taskExecutorHash, PacketReceiverTask switch (receiver.task()) { case TaskBus -> TaskBus.execute(taskExecutorHash, packetReceiverTask); + case EventBus -> EventBus.asyncExecute(taskExecutorHash, packetReceiverTask); case NettyIO -> atReceiver(packetReceiverTask); // case VirtualThread -> Thread.ofVirtual().name("virtual-at" + clazz.getSimpleName()).start(() -> atReceiver(packetReceiverTask)); }