-1

I want to read data from last offset, but use:

consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET)

No effect.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
loongshaw
  • 41
  • 1
  • 4

1 Answers1

1

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.

Xinyu Zhou
  • 48
  • 4