Example usage for org.springframework.messaging.simp.stomp StompBrokerRelayMessageHandler StompBrokerRelayMessageHandler

List of usage examples for org.springframework.messaging.simp.stomp StompBrokerRelayMessageHandler StompBrokerRelayMessageHandler

Introduction

In this page you can find the example usage for org.springframework.messaging.simp.stomp StompBrokerRelayMessageHandler StompBrokerRelayMessageHandler.

Prototype

public StompBrokerRelayMessageHandler(SubscribableChannel inboundChannel, MessageChannel outboundChannel,
        SubscribableChannel brokerChannel, Collection<String> destinationPrefixes) 

Source Link

Document

Create a StompBrokerRelayMessageHandler instance with the given message channels and destination prefixes.

Usage

From source file:org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandlerIntegrationTests.java

private void createAndStartRelay() throws InterruptedException {
    this.relay = new StompBrokerRelayMessageHandler(new StubMessageChannel(), this.responseChannel,
            new StubMessageChannel(), Arrays.asList("/queue/", "/topic/"));
    this.relay.setRelayPort(this.port);
    this.relay.setApplicationEventPublisher(this.eventPublisher);
    this.relay.setSystemHeartbeatReceiveInterval(0);
    this.relay.setSystemHeartbeatSendInterval(0);

    this.relay.start();
    this.eventPublisher.expectBrokerAvailabilityEvent(true);
}