Package org.springframework.integration

Examples of org.springframework.integration.MessageChannel.send()


    int iterations = 13;
    for (int i = 0; i < iterations; i++) {
      Message<?> message = MessageBuilder.withPayload(i).setCorrelationId(1).
            setSequenceNumber(i).setSequenceSize(iterations).build();
      System.out.println("Sending: " + message);
      inputChannel.send(message);
     
      Thread.sleep(1000);
    }
  }
View Full Code Here


   */
  public static void main(String[] args) throws Exception{
    ApplicationContext context = new ClassPathXmlApplicationContext("resequencer-config.xml", ResequencerDemo.class);
    MessageChannel inputChannel = context.getBean("inputChannel", MessageChannel.class);
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(1).setSequenceNumber(5).build());
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(1).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(1).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
View Full Code Here

  public static void main(String[] args) throws Exception{
    ApplicationContext context = new ClassPathXmlApplicationContext("resequencer-config.xml", ResequencerDemo.class);
    MessageChannel inputChannel = context.getBean("inputChannel", MessageChannel.class);
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(1).setSequenceNumber(5).build());
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(1).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(1).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
View Full Code Here

    ApplicationContext context = new ClassPathXmlApplicationContext("resequencer-config.xml", ResequencerDemo.class);
    MessageChannel inputChannel = context.getBean("inputChannel", MessageChannel.class);
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(1).setSequenceNumber(5).build());
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(1).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(1).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
View Full Code Here

   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(1).setSequenceNumber(5).build());
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(1).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(1).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(1).setSequenceNumber(3).build());
   
View Full Code Here

    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(1).setSequenceNumber(5).build());
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(1).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(1).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(1).setSequenceNumber(3).build());
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(2).setSequenceNumber(5).build())
View Full Code Here

    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(1).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(1).setSequenceNumber(3).build());
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(2).setSequenceNumber(5).build())
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(2).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(2).setSequenceNumber(3).build());
View Full Code Here

   
    inputChannel.send(MessageBuilder.withPayload(2).setCorrelationId(2).setSequenceNumber(2).build());
    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(1).setSequenceNumber(3).build());
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(2).setSequenceNumber(5).build())
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(2).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(2).setSequenceNumber(3).build());
   
View Full Code Here

    inputChannel.send(MessageBuilder.withPayload(1).setCorrelationId(2).setSequenceNumber(1).build());
   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(1).setSequenceNumber(3).build());
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(2).setSequenceNumber(5).build())
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(2).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(2).setSequenceNumber(3).build());
   
    System.in.read();
  }
View Full Code Here

   
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(1).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(1).setSequenceNumber(3).build());
   
    inputChannel.send(MessageBuilder.withPayload(5).setCorrelationId(2).setSequenceNumber(5).build())
    inputChannel.send(MessageBuilder.withPayload(4).setCorrelationId(2).setSequenceNumber(4).build());
    inputChannel.send(MessageBuilder.withPayload(3).setCorrelationId(2).setSequenceNumber(3).build());
   
    System.in.read();
  }
 
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.