I want to read data from last offset, but use:
consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET)
No effect.
I want to read data from last offset, but use:
consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET)
No effect.
ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET
only works when your consumer connect to broker in the first time.You may want to use
sh mqadmin resetOffsetByTime
to reset the offset to now. More details please refer to here.