Object aggregateIdentifier = commandTargetResolver.resolveTarget(command).getIdentifier();
invokerSegment = idHash % commandHandlerInvokers.length;
long sequence = ringBuffer.next();
CommandHandlingEntry event = ringBuffer.get(sequence);CommandHandlingEntry will then be initialized with current context data.
ringBuffer.publish(sequence);and then delegates it to all instances of CommandHandlerInvoker
eventHandler.onEvent(event, nextSequence, nextSequence == availableSequence);
long nextSequence = sequence.get() + 1L;and then delegates it to all consumers - in this case all instances of CommandHandlerInvoker
eventHandler.onEvent(event, nextSequence, nextSequence == availableSequence);