Skip to content

Commit

Permalink
Merge pull request #62 from agorapulse/fix/do-not-always-requeue-if-o…
Browse files Browse the repository at this point in the history
…nly-requeue-on-delete

do not always requeue when you should only requeue deleted messages
  • Loading branch information
musketyr authored Mar 3, 2025
2 parents 5a9c765 + 7631f28 commit 89bb482
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static <T> DefaultQueueMessage<T> alwaysRequeue(String id, T message, Runnable d
}

static <T> DefaultQueueMessage<T> requeueIfDeleted(String id, T message, Runnable doDelete, Runnable doRequeue) {
return new DefaultQueueMessage<>(id, message, doDelete, doRequeue, true);
return new DefaultQueueMessage<>(id, message, doDelete, doRequeue, false);
}

private final String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class QueueListenerAndProducerSpec extends Specification {
Job job = jobManager.getJob(jobName).get()
then:
job.configuration.consumer.queueName == 'my-queue'
job.configuration.consumer.maxMessages == 10
job.configuration.fixedRate == Duration.ofSeconds(20)
job.configuration.consumer.maxMessages == Integer.MAX_VALUE
job.configuration.initialDelay == Duration.ofSeconds(30)
}

void 'producer job is registered'() {
Expand Down

0 comments on commit 89bb482

Please sign in to comment.