Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit 3c054d6

Browse files
author
Anton Vorontsov
committed
Finished Workflow of message handling.
1 parent b3755ee commit 3c054d6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/message-consumption.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,13 @@ So you can use async/await power inside your message handler.
286286

287287
### Workflow of message handling
288288

289-
290-
289+
The message handling process is organized as follows:
290+
291+
- `IQueueMessage` receives a message as a byte array and decodes it in UTF8 string.
292+
- `IQueueMessage` checks if there are any message handlers in collections of `IMessageHandler`, `IAsyncMessageHandler`, `INonCyclicMessageHandler` and `IAsyncNonCyclicMessageHandler` instances and forwards a message to them.
293+
- All subscribed message handlers (`IMessageHandler`, `IAsyncMessageHandler`, `INonCyclicMessageHandler`, `IAsyncNonCyclicMessageHandler`) process the message.
294+
- `IQueueMessage` acknowledges the message by its `DeliveryTag`.
295+
- If any exception occurs `IQueueMessage` acknowledges the message anyway and checks if the message has to be re-send. If exchange option `RequeueFailedMessages` is set `true` then `IQueueMessage` adds a header `"requeued"` to the message and sends it again with delay in 60 seconds. Mechanism of sending delayed messages covered in the message production [documentation](message-production.md).
296+
- If any exception occurs within handling the message that has been already re-sent that message will not be re-send again (re-send happens only once).
291297

292298
For message production features see the [Previous page](message-production.md)

0 commit comments

Comments
 (0)