Example usage for org.springframework.integration.stream CharacterStreamReadingMessageSource stdin

List of usage examples for org.springframework.integration.stream CharacterStreamReadingMessageSource stdin

Introduction

In this page you can find the example usage for org.springframework.integration.stream CharacterStreamReadingMessageSource stdin.

Prototype

public static final CharacterStreamReadingMessageSource stdin() 

Source Link

Document

Create a source that reads from System#in .

Usage

From source file:org.springframework.integration.samples.mqtt.Application.java

@Bean
public IntegrationFlow mqttOutFlow() {
    return IntegrationFlows
            .from(CharacterStreamReadingMessageSource.stdin(), e -> e.poller(Pollers.fixedDelay(1000)))
            .transform(p -> p + " sent to MQTT").handle(mqttOutbound()).get();
}