Package org.springframework.xd.dirt.test.sink

Examples of org.springframework.xd.dirt.test.sink.SingleNodeNamedChannelSinkFactory


    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


    Thread.sleep(1000);
    assertEquals(2, integrationSupport.streamRepository().count());

    MessageBus bus = integrationSupport.messageBus();

    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);
View Full Code Here

    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

    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

    SingleNodeProcessingChainProducer chain = chainProducer(application, "dateToDateTime", processingChainUnderTest);

    StreamDefinition tap = new StreamDefinition("testtap", "tap:stream:dateToDateTime.0 > queue:tap");
    integrationSupport.createAndDeployStream(tap);
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(integrationSupport.messageBus()).createNamedChannelSink("queue:tap");

    chain.sendPayload(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));

    Object payload = sink.receivePayload(RECEIVE_TIMEOUT);
    assertNotNull(payload);
View Full Code Here

    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!"));

    Message<?> m1;
    int count1 = 0;
View Full Code Here

    assertModuleRequest(routerDefinition.getName(), "router", false);

    MessageBus bus = testMessageBus != null ? testMessageBus : integrationSupport.messageBus();
    assertNotNull(bus);

    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");
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.test.sink.SingleNodeNamedChannelSinkFactory

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.