// we use default settings for the disruptor command bus
DisruptorCommandBus commandBus = new DisruptorCommandBus(eventStore, eventBus);
// now, we obtain a repository from the command bus
Repository<ToDoItem> repository = commandBus.createRepository(new GenericAggregateFactory<ToDoItem>(ToDoItem.class));
// we use the repository to register the command handler
AggregateAnnotationCommandHandler.subscribe(ToDoItem.class, repository, commandBus);
// the CommandGateway provides a friendlier API to send commands