ah, so the logic is like this:
Do a http call (
ktorClient.post - suspending function)
If that fails, try again within 0.1 seconds - (delay, suspending function)
If that fails, try again within 0.5 seconds - (delay, suspending function)
If that fails try again within 1 second - (delay, suspending function)
if that fails -> throw Exception
I have dummy debug logs around pretty much everything at this point and even though the ktorClient calls a 404-endpoint (which returns immediately) it doesn’t return and log that it will retry until 30 seconds later. The message that triggers this whole loop has a “visibility timeout” of 30 seconds so the behavior that I am seeing is that when the message get’s republished suddenly the first coroutine wakes up as well and they are both dealt with