org.springframework.integration.core.MessagingTemplate Java Examples

The following examples show how to use org.springframework.integration.core.MessagingTemplate. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmployeeJobConfigMaster.java    From batchers with Apache License 2.0 6 votes vote down vote up
@Bean
@StepScope
public PartitionHandler taxCalculationPartitionHandler() {
    MessageChannelPartitionHandler messageChannelPartitionHandler = new MessageChannelPartitionHandler();
    messageChannelPartitionHandler.setGridSize(clusterConfig.getClusterSize() - MASTER_WITHOUT_TAX_CALCULATION_STEP);
    messageChannelPartitionHandler.setReplyChannel(replyChannel());
    messageChannelPartitionHandler.setStepName(EmployeeJobConfigSlave.TAX_CALCULATION_STEP);

    MessagingTemplate messagingGateway = new MessagingTemplate();
    messagingGateway.setReceiveTimeout(RECEIVE_TIMEOUT);
    messagingGateway.setDefaultChannel(outboundRequests());
    messageChannelPartitionHandler.setMessagingOperations(messagingGateway);

    return messageChannelPartitionHandler;
}
 
Example #2
Source File: RemoteConfiguration.java    From CogStack-Pipeline with Apache License 2.0 5 votes vote down vote up
@Bean
@Qualifier("partitionHandler")
public MessageChannelPartitionHandler partitionHandler(
        @Qualifier("requestChannel") MessageChannel reqChannel,
        @Qualifier("aggregatedReplyChannel") PollableChannel repChannel) {
    MessageChannelPartitionHandler handler = new MessageChannelPartitionHandler();
    handler.setGridSize(gridSize);
    handler.setStepName("compositeSlaveStep");
    handler.setReplyChannel(repChannel);
    MessagingTemplate template = new MessagingTemplate();
    template.setDefaultChannel(reqChannel);
    template.setReceiveTimeout(partitionHandlerTimeout);
    handler.setMessagingOperations(template);
    return handler;
}
 
Example #3
Source File: ChannelAdapterConverter.java    From citrus-admin with Apache License 2.0 5 votes vote down vote up
@Override
protected Map<String, Class<?>> getOptionTypeMappings() {
    Map<String, Class<?>> mappings = super.getOptionTypeMappings();
    mappings.put("messagingTemplate", MessagingTemplate.class);
    mappings.put("channelResolver", DestinationResolver.class);
    return mappings;
}
 
Example #4
Source File: ITTracingChannelInterceptorTests.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Bean
public MessagingTemplate messagingTemplate() {
	return new MessagingTemplate(directChannel());
}