Skip to content

Commit

Permalink
Return original messages when autoDelete is used just in case message…
Browse files Browse the repository at this point in the history
… deletion retries are exhausted
  • Loading branch information
calvinlfer committed Jan 8, 2025
1 parent 9dae16e commit b3dafd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zio-sqs/src/main/scala/zio/sqs/SqsStream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object SqsStream {
.flattenChunks
.mapChunksZIO { messages =>
// NOTE: At-most-once semantics (when autoDelete=true)
if (settings.autoDelete) deleteMessageBatch(queueUrl, messages)
if (settings.autoDelete) deleteMessageBatch(queueUrl, messages).as(messages)
else Exit.succeed(messages)
}
}
Expand Down

0 comments on commit b3dafd7

Please sign in to comment.