-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-1130: Repub Recoverer include ex. message size
Resolves #1130 `RepublishingMessageRecoverer` - include the exception message length in the truncation algorithm. Note that the message is included in the stack trace. If the stack trace + exception message would exceed the limit - first truncate the message within the stack trace to 100 bytes -- if the stack trace and original message still exceed the limit -- also truncate the `X_EXCEPTION_MESSAGE` header to 100 bytes and use the remaing space for stack trace If, after truncating the message in the stack trace, there is room remaining the full stack trace as well as the truncated message, re-truncate the `X_EXCEPTION_MESSAGE` header to use the remaining available bytes. examples: message 150 bytes, stack trace 350 bytes, available 300 bytes, stack trace after message truncation 300 bytes - truncate message to 100, trace to 200 message 200 bytes, stack trace 250 bytes, available 300 bytes, stack trace after message truncation 150 bytes - truncate message to 100 bytes, trace to 200 message 200 bytes, stack trace 250 bytes, available 300 bytes, stack trace after message truncation 150 bytes - truncate message to 150 bytes, trace remains at 150 These are for illustration only, the available bytes is generally must larger. **cherry-pick to 2.1.x** * Fix conflicts in the `RepublishMessageRecovererIntegrationTests` for current code base around `ListenerExecutionFailedException` and `MessageProperties`
- Loading branch information
1 parent
ce677bf
commit 5cadcc3
Showing
3 changed files
with
136 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters