> For the complete documentation index, see [llms.txt](https://docs.rumi.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rumi.systems/rumi-core/guides/developing-applications/authoring-user-code/message-processing.md).

# Message Processing

This section covers how to process messages in your microservice handlers, including filtering, handling, and dealing with unhandled messages.

## Overview

Message processing is the core of Rumi microservice development. Messages arrive on subscribed channels, are filtered and dispatched to handlers, where business logic executes within automatic transactions.

## Message Processing Flow

1. **Message Arrival** - Inbound message arrives on subscribed channel
2. **Duplicate Detection** - Sequence numbers checked to detect and discard duplicates
3. **Filtering** - Optional filter determines if message should be processed
4. **Handler Dispatch** - AEP Engine dispatches to handler based on message type
5. **Business Logic** - Handler reads message, updates store, creates outbound messages
6. **Transaction Commit** - Handler returns, transaction commits with consensus
7. **Message Acknowledgment** - Inbound message acknowledged

## Topics

* [**Detecting Duplicates**](/rumi-core/guides/developing-applications/authoring-user-code/message-processing/detecting-duplicates.md) - Detect and discard duplicate messages using sequence numbers
* [**Filtering Messages**](/rumi-core/guides/developing-applications/authoring-user-code/message-processing/filtering-messages.md) - Use message filters to selectively process messages
* [**Processing Messages**](/rumi-core/guides/developing-applications/authoring-user-code/message-processing/processing-messages.md) - Core message handling and business logic
  * [Handling Messages](/rumi-core/guides/developing-applications/authoring-user-code/message-processing/processing-messages/handling-messages.md) - Write message handlers
  * [Sending Messages](/rumi-core/guides/developing-applications/authoring-user-code/message-processing/processing-messages/sending-messages.md) - Send outbound messages
* [**Unhandled Messages**](/rumi-core/guides/developing-applications/authoring-user-code/message-processing/unhandled-messages.md) - Handle messages with no registered handler

## Related Topics

* [Message Processing](/rumi-core/concepts/microservice-operation/message-processing.md) - Conceptual overview
* [Transactions](/rumi-core/concepts/transactions.md) - How transactions work
* [Registering Message Interest](/rumi-core/guides/developing-applications/configuring-messaging/registering-message-interest.md) - Subscribe to message channels
