Package org.springframework.xd.dirt.test.source

Examples of org.springframework.xd.dirt.test.source.SingleNodeNamedChannelSourceFactory


    StreamDefinition mqtt1 = new StreamDefinition("mqtt1", "queue:mqttsource > mqtt --topic=foo");
    StreamDefinition mqtt2 = new StreamDefinition("mqtt2", "mqtt --topics=foo > queue:mqttsink");
    integrationSupport.createAndDeployStream(mqtt1);
    integrationSupport.createAndDeployStream(mqtt2);

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(integrationSupport.messageBus()).createNamedChannelSource("queue:mqttsource");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(integrationSupport.messageBus()).createNamedChannelSink("queue:mqttsink");

    Thread.sleep(1000);
    source.sendPayload("hello");
    Object result = sink.receivePayload(1000);
View Full Code Here


    StreamDefinition testStream = new StreamDefinition(streamName, streamDefinition);
    integrationSupport.createAndDeployStream(testStream);

    MessageBus messageBus = integrationSupport.messageBus();

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(messageBus).createNamedChannelSource("queue:producer");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(messageBus).createNamedChannelSink("queue:consumer");

    source.sendPayload("ping");
    String result = (String) sink.receivePayload(5000);
    assertEquals(expected, result);
View Full Code Here

    StreamDefinition testStream = new StreamDefinition(streamName, streamDefinition);
    integrationSupport.createAndDeployStream(testStream);

    MessageBus messageBus = integrationSupport.messageBus();

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(messageBus).createNamedChannelSource("queue:producer");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(messageBus).createNamedChannelSink("queue:consumer");

    source.sendPayload("hello");
    String result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
    assertEquals("HELLO", result);
View Full Code Here

    SingleNodeNamedChannelSinkFactory sinkFactory = new SingleNodeNamedChannelSinkFactory(bus);

    NamedChannelSink bar1sink = sinkFactory.createNamedChannelSink("queue:bar1");
    NamedChannelSink bar2sink = sinkFactory.createNamedChannelSink("queue:bar2");
    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource(TOPIC_FOO);

    source.sendPayload("hello");

    final Object bar1 = bar1sink.receivePayload(10000);
    final Object bar2 = bar2sink.receivePayload(10000);
View Full Code Here

    integrationSupport.createAndDeployStream(streamDefinition);
    integrationSupport.createAndDeployStream(tapDefinition);

    MessageBus bus = integrationSupport.messageBus();

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource("queue:source");
    NamedChannelSink streamSink = new SingleNodeNamedChannelSinkFactory(bus).createNamedChannelSink("queue:sink");
    NamedChannelSink tapSink = new SingleNodeNamedChannelSinkFactory(bus).createNamedChannelSink("queue:tap");

    source.send(new GenericMessage<String>("Dracarys!"));
View Full Code Here

    SingleNodeNamedChannelSinkFactory sinkFactory = new SingleNodeNamedChannelSinkFactory(bus);

    NamedChannelSink foosink = sinkFactory.createNamedChannelSink(QUEUE_FOO);
    NamedChannelSink barsink = sinkFactory.createNamedChannelSink(QUEUE_BAR);

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource(QUEUE_ROUTE);

    source.sendPayload("a");
    source.sendPayload("b");

    final Object fooPayload = foosink.receivePayload(10000);
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.test.source.SingleNodeNamedChannelSourceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.