department-of-veterans-affairs / abd-vro

To get Veterans benefits in minutes, VRO software uses health evidence data to help fast track disability claims.
Other
19 stars 6 forks source link

lib-hoppy: Update to include per message TTL parameter for AsyncHoppyClient. #3180

Closed dfitchett closed 2 months ago

dfitchett commented 2 months ago

What was the problem?

During a recent BGS outage, 3 requests for two failed jobs (6 total) were sent it with no response. Currently, there is no queue wide message TTL policy, and no per message TTL was being set by the publisher (AsyncHoppyClient) when sending the requests, and although the service was down, the messages sent to add notes to a claim were still in queue. When the service came back up, it resulted in duplicate notes being added to the queue.

Associated tickets or Slack threads:

How does this fix it?[^1]

Adds a configurable per-message TTL to the message upon publishing. The default is set to zero. From the documentation:

Setting the TTL to 0 causes messages to be expired upon reaching a queue unless they can be delivered to a consumer immediately. Thus this provides an alternative to the immediate publishing flag, which the RabbitMQ server does not support. Unlike that flag, no basic.returns are issued, and if a dead letter exchange is set then messages will be dead-lettered.

There is currently no dead lettering happening, and is unsupported by VRO and

How to test this PR

[^1]: Pull-Requests guidelines. If PR is significant, update Current Software State wiki page. [^secrel]: To check if a PR will succeed in the SecRel workflow, test PRs in the SecRel pipeline.

github-actions[bot] commented 2 months ago

Test Results

116 tests  ±0   116 :white_check_mark: ±0   36s :stopwatch: -1s  34 suites ±0     0 :zzz: ±0   34 files   ±0     0 :x: ±0 

Results for commit 23a6f640. ± Comparison against base commit a8a375fe.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

JaCoCo Test Coverage

Overall Project 67.56% :x:

There is no coverage information present for the Files changed