Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/chubaostream/joyqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
gaohaoxiang committed Sep 9, 2020
2 parents 5862b6b + 0919c12 commit 61726df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,16 @@ public boolean isRetry(Consumer consumer) throws JoyQueueException {

Boolean retry = clusterManager.getConsumerPolicy(TopicName.parse(consumer.getTopic()), consumer.getApp()).getRetry();
List<Short> masterPartitionList = clusterManager.getLocalPartitions(TopicName.parse(consumer.getTopic()));
if (!retry.booleanValue() || !masterPartitionList.contains((short) 0)) {

if (!retry) {
logger.debug("retry enable is false.");
return false;
}
if (randomBound == 1) {
return true;
} else if (!masterPartitionList.contains((short) 0)) {
return false;
}

int val = random.nextInt(randomBound);
// 重试管理中获取从重试分区消费的概率
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<commons-cli.version>1.4</commons-cli.version>
<httpclient.version>4.5.12</httpclient.version>
<httpasyncclient.version>4.1.4</httpasyncclient.version>
<jackson-databind.version>2.10.0.pr1</jackson-databind.version>
<jackson-databind.version>2.9.10.4</jackson-databind.version>
<validation-api.version>2.0.1.Final</validation-api.version>
<hibernate-validator.version>5.3.5.Final</hibernate-validator.version>
<el.version>2.2.4</el.version>
Expand Down

0 comments on commit 61726df

Please sign in to comment.