Skip to content

Commit

Permalink
fix(spool): remove message when retries run out (#1427)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDombo authored Mar 29, 2023
1 parent 2d93f9d commit 2a69115
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ protected CompletableFuture<Integer> publishSingleSpoolerMessage(AwsIotMqttClien
logger.atError().log("Failed to publish the message via Spooler"
+ " after retried {} times and will drop the message",
maxPublishRetryCount, throwable);
spool.removeMessageById(finalId);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ void GIVEN_publish_request_unsuccessfully_WHEN_spool_single_message_THEN_not_ret
client.publishSingleSpoolerMessage(awsIotMqttClient);

verify(awsIotMqttClient).publish(any(), any(), anyBoolean());
verify(spool, never()).removeMessageById(anyLong());
verify(spool, times(1)).removeMessageById(anyLong());
verify(spool, never()).addId(anyLong());
}

Expand Down

0 comments on commit 2a69115

Please sign in to comment.