cashapp / misk

Microservice Kontainer

Home Page:https://cashapp.github.io/misk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose SQS message's ApproximateReceiveCount through jobqueue jobs

jdm-square opened this issue · comments

It can be useful to know how many times a job has been attempted—for example, with time-sensitive jobs this can avoid useless DLQs entries which will only be deleted later.

https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/sqs/model/Message.html#attributes()

Specifically: the job interface would need a new field for this information, and then https://github.com/cashapp/misk/blob/master/misk-aws/src/main/kotlin/misk/jobqueue/sqs/SqsJob.kt would need to extract and return it.

Closing, since it looks like this should already be available through

override val attributes: Map<String, String> by lazy {
.