Package org.springframework.integration.channel

Examples of org.springframework.integration.channel.DirectChannel.send()


    QueueChannel input2 = new QueueChannel();
    input2.setBeanName("test.input2J");
    bus.bindConsumer("partJ.0", input2, properties);

    output.send(new GenericMessage<Integer>(2));
    output.send(new GenericMessage<Integer>(1));
    output.send(new GenericMessage<Integer>(0));

    Message<?> receive0 = input0.receive(1000);
    assertNotNull(receive0);
    Message<?> receive1 = input1.receive(1000);
View Full Code Here


    input2.setBeanName("test.input2J");
    bus.bindConsumer("partJ.0", input2, properties);

    output.send(new GenericMessage<Integer>(2));
    output.send(new GenericMessage<Integer>(1));
    output.send(new GenericMessage<Integer>(0));

    Message<?> receive0 = input0.receive(1000);
    assertNotNull(receive0);
    Message<?> receive1 = input1.receive(1000);
    assertNotNull(receive1);
View Full Code Here

    Properties props = new Properties();
    props.put("maxAttempts", 2);
    props.put("backOffInitialInterval", 100);
    props.put("backOffMultiplier", "1.0");
    bus.bindConsumer("retry.0", new DirectChannel(), props); // no subscriber
    channel.send(new GenericMessage<String>("foo"));
    RedisTemplate<String, Object> template = createTemplate();
    Object rightPop = template.boundListOps("ERRORS:retry.0").rightPop(5, TimeUnit.SECONDS);
    assertNotNull(rightPop);
    assertThat(new String((byte[]) rightPop), containsString("foo"));
  }
View Full Code Here

    jobPartitionerPlugin.postProcessModule(module);
    checkBusBound(messageBus);
    stepsOut.send(new GenericMessage<String>("foo"));
    Message<?> stepExecutionRequest = stepsIn.receive(10000);
    assertThat(stepExecutionRequest, hasPayload("foo"));
    stepResultsOut.send(MessageBuilder.withPayload("bar")
        .copyHeaders(stepExecutionRequest.getHeaders()) // replyTo
        .build());
    assertThat(stepResultsIn.receive(10000), hasPayload("bar"));
    jobPartitionerPlugin.removeModule(module);
    checkBusUnbound(messageBus);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.