@Bean public ChannelMapping channelMapping() { return DefaultChannelMapping.builder().build(); }
@Bean public ChannelMapping channelMapping() { return DefaultChannelMapping.builder().build(); }
public CommandMessageHandlerUnitTestSupport commandHandlers(CommandHandlers commandHandlers) { this.dispatcher = new CommandDispatcher("mockCommandDispatcher-" + System.currentTimeMillis(), commandHandlers, DefaultChannelMapping.builder().build(), (subscriberId, channels, handler) -> CommandMessageHandlerUnitTestSupport.this.handler = handler, (destination, message) -> { CommandMessageHandlerUnitTestSupport.this.replyDestination = destination; CommandMessageHandlerUnitTestSupport.this.replyMessage = message; } ); dispatcher.initialize(); producer = new CommandProducerImpl((destination, message) -> { String id = idGenerator.generateId().toString(); message.getHeaders().put(Message.ID, id); handler.accept(message); }, DefaultChannelMapping.builder().build()); return this; }
@Bean public ChannelMapping channelMapping(TramCommandsAndEventsIntegrationData data) { return DefaultChannelMapping.builder() .with("ReplyTo", data.getAggregateDestination()) .with("customerService", data.getCommandChannel()) .build(); }
@Bean public ChannelMapping channelMapping(TramCommandsAndEventsIntegrationData data) { return DefaultChannelMapping.builder() .with("CustomerAggregate", data.getAggregateDestination()) .with("customerService", data.getCommandChannel()) .build(); }
@Bean public ChannelMapping channelMapping(TramCommandsAndEventsIntegrationData data) { return DefaultChannelMapping.builder() .with("CustomerAggregate", data.getAggregateDestination()) .with("customerService", data.getCommandChannel()) .with(CreateOrderSaga.class.getName(), data.getSagaEventsChannel()) .build(); }