I am pushing 100 messages on to stream with 1 shrad.
spring:
cloud:
stream:
bindings:
myOutBound:
destination: my-stream
contentType: application/json
I am pushing messages in loop for testing purpose
@EnableBinding(MyBinder.class)
public class MyProcessor {
@Autowired
private MyBinder myBinder;
public void processRollup() {
List<MyObject> myObjects = IntStream.range(1, 100)
.mapToObj(Integer::valueOf)
.map(s-> new MyObject(s))
.collect(toList());
myObjects.forEach(messagePayload ->{
System.out.println(messagePayload.getId());
myBinder.myOutBound()
.send(MessageBuilder.withPayload(messagePayload)
.build());
}
);
}
}
I am consuming messages like below
spring:
cloud:
stream:
bindings:
RollUpInboundStream:
group: my-consumer-group
destination: my-stream
content-type: application/json
The message consumption is not ordered.
Am I missing something.