Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion servicepulse/intro-editing-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ If a message cannot be successfully retried it is possible to fix the malformed

![Edit Malformed Messages](images/edit-message-details.png 'width=500')

> [!NOTE]
> This feature works in the following way:
> 1. A copy of the failed message with new [message ID](/nservicebus/messaging/message-identity.md) is created.
> 2. The headers and body of the newly created copy can be edited.
> 3. The copied message is dispatched, and the original failed message is marked as resolved.

## Enabling the feature

> [!WARNING]
Expand Down Expand Up @@ -52,10 +58,11 @@ Message bodies can be edited before they are retried. This is only possible for
> [!WARNING]
> Retrying messages after editing the message headers can cause message processing failures and/or visualization issues in the ServicePulse and ServiceInsight.

When retrying an edited message it is possible that the original failed message will have been resolved by another user, retried successfully by another user, or [expired as part of the automated processes](/servicecontrol/how-purge-expired-data.md). In those scenarios, the retry of the edited message will fail.
When retrying an edited message it is possible that the original failed message will have been resolved by another user, retried successfully by another user, or [expired as part of the automated processes](/servicecontrol/how-purge-expired-data.md). In those scenarios, the new message will not be dispatched and the retry of the edited message will fail.

As soon as a message has been dispatched for retrying the originally failing message will be marked as resolved. If the retry message subsequently fails it will appear as a new failed message in the user interface. That new failed message will be marked as having been edited and also have a link to the original message.

The copy of the failed message receives a new [message ID](/nservicebus/messaging/message-identity.md). The copied message is related to the original failed message through [`NServiceBus.CorrelationId`](/nservicebus/messaging/headers.md#messaging-interaction-headers-nservicebus-correlationid) header that is set to the ID of the original message. The copy carries also the same [`NServiceBus.ConversationId`](/nservicebus/messaging/headers.md#messaging-interaction-headers-nservicebus-conversationid) as the original.

## Limitations and restrictions

Expand All @@ -64,3 +71,5 @@ A failed message must not have been resolved by a user, successfully retried, or
The bodies of messages with encrypted properties cannot be edited.

The edited message will be assigned a new message ID before dispatching. The new message ID is automatically generated and is a GUID stored as a string in the edited message's headers.

Resolving a failed message doesn't publish any [ServiceControl events](/servicecontrol/contracts.md#other-events).