Ack’s are automatically sent by the Message Handler for successful message handlers that don’t throw Exceptions.
See the linked tests in the docs under the list of MQ Server options for integration tests which verifies the behavior of the Message Workflow documented in the docs.
The linked integration tests in the docs verify the behavior of the MQ Handlers, start with those and compare them with your code to workout the discrepancy.
ok nvm, the issue I thought I had a failing local test but it was because I had dirty messages in the existing MQ’s so I’m now purging the messages before the tests are run:
The other issue is due to an AppHost being required to generate the Error DTOs, if you don’t have one (i.e. trying to run this outside of a ServiceStack App) you can create an empty AppHost with:
Thanks.
My exception problem was because my handler is an async function.
So now the exception is catched by SS and the retry is invoked.
Can a handler be awited async function?
No it doesn’t expect it to return a task so it can’t asynchronously await it.
This Ack? It’s retrieving the message directly from the .dlq MQ, (i.e. outside of processing the MQ message) when retrieving messages manually your App needs to make the decision when it has taken responsibility of it with an explicit Ack.