我想用 multi-EventHandleGroup 处理不同的事件?我找不到那个例子。谢谢......这是代码:
executorService = Executors.newFixedThreadPool(threadPoolSize);
disruptor = new Disruptor<>(new DefaultEventFactory(),
ringBufferSize, executorService
, ProducerType.SINGLE, new BlockingWaitStrategy());
EventHandlerGroup<OrderEvent> orderEventEventHandlerGroup =
disruptor.handleEventsWith(
new OrderEventHandle(rabbitTemplate));
orderEventEventHandlerGroup.then(new
MoveEventFromProcessing(redisService))
.then(new EventClearHandle());
我想添加另一个事件,我想用另一个 EventHandleGroup 来处理它,例如:
cancelEventDisruptor.handleEventsWith(new
CancelOrderHandle()).then(new MoveEventFromProcessing(redisService))
.then(new EventClearHandle());