Hi team,
I looked the design doc and saw consumer section, it will fetch messages in a blockingqueue first and up level consumer thread parallel consume. In case one up level consume one message failed, how we know it and let us consume again?
10K send by a producer with props.put("producer.type", "async");
try to consume by index simpleConsumer1.consume("test-topic", index, 1024); in bounded while loop
after the the first iteration, it failed with:
Exception in thread "main" java.lang.IndexOutOfBoundsException
at com.leansoft.luxun.common.exception.ErrorMapper.toException(ErrorMapper.java:34)
at com.leansoft.luxun.consumer.SimpleConsumer.consume(SimpleConsumer.java:86)
Is it possible to supply acknowledge option and to remove the message from the queue after consumer acknowledged?
In case of producer or consumer crash, during recovery, we might not expect the consumed messages.
Otherwise the consumer application might be designed as idempotent.
How do you think about it(or I have misunderstand Luxun's architecture )
It is good to expose the low level interface - getSize : total number of items remaining in the queue - to high level api and JMX for stats or morning.