Skip to content

Commit

Permalink
[INLONG-9087][Sort] TubeMQ Connector use latest offset mode (#9088)
Browse files Browse the repository at this point in the history
  • Loading branch information
vernedeng authored Oct 23, 2023
1 parent 47c7c78 commit a0b69d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void initializeState(FunctionInitializationContext context) throws Except
public void open(Configuration parameters) throws Exception {
ConsumerConfig consumerConfig = new ConsumerConfig(masterAddress, consumerGroup);
consumerConfig.setConsumePosition(consumeFromMax
? ConsumePosition.CONSUMER_FROM_MAX_OFFSET_ALWAYS
? ConsumePosition.CONSUMER_FROM_LATEST_OFFSET
: ConsumePosition.CONSUMER_FROM_FIRST_OFFSET);

consumerConfig.setMsgNotFoundWaitPeriodMs(messageNotFoundWaitPeriod.toMillis());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void initializeState(FunctionInitializationContext context) throws Except
public void open(Configuration parameters) throws Exception {
ConsumerConfig consumerConfig = new ConsumerConfig(masterAddress, consumerGroup);
consumerConfig.setConsumePosition(consumeFromMax
? ConsumePosition.CONSUMER_FROM_MAX_OFFSET_ALWAYS
? ConsumePosition.CONSUMER_FROM_LATEST_OFFSET
: ConsumePosition.CONSUMER_FROM_FIRST_OFFSET);

consumerConfig.setMsgNotFoundWaitPeriodMs(messageNotFoundWaitPeriod.toMillis());
Expand Down

0 comments on commit a0b69d6

Please sign in to comment.