Example usage for org.springframework.messaging.simp.broker OrderedMessageSender configureOutboundChannel

List of usage examples for org.springframework.messaging.simp.broker OrderedMessageSender configureOutboundChannel

Introduction

In this page you can find the example usage for org.springframework.messaging.simp.broker OrderedMessageSender configureOutboundChannel.

Prototype

static void configureOutboundChannel(MessageChannel channel, boolean preservePublishOrder) 

Source Link

Document

Install or remove an ExecutorChannelInterceptor that invokes a completion task once the message is handled.

Usage

From source file:org.springframework.messaging.simp.broker.OrderedMessageSenderTests.java

@Before
public void setup() {
    this.executor = new ThreadPoolTaskExecutor();
    this.executor.setCorePoolSize(Runtime.getRuntime().availableProcessors() * 2);
    this.executor.setAllowCoreThreadTimeOut(true);
    this.executor.afterPropertiesSet();

    this.channel = new ExecutorSubscribableChannel(this.executor);
    OrderedMessageSender.configureOutboundChannel(this.channel, true);

    this.sender = new OrderedMessageSender(this.channel, logger);

}