Fix null message_type causing NOT NULL violation when dead-lettering …#2306
Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom Mar 16, 2026
Merged
Fix null message_type causing NOT NULL violation when dead-lettering …#2306jeremydmiller merged 1 commit intoJasperFx:mainfrom
jeremydmiller merged 1 commit intoJasperFx:mainfrom
Conversation
9b94f74 to
3889b54
Compare
Contributor
Author
|
Main seems to have the failing tests. |
…CloudEvents with unregistered types
When a Kafka CloudEvents message arrives with an unregistered `type`,
CloudEventsMapper throws UnknownMessageTypeNameException before setting
envelope.MessageType. The subsequent dead-letter INSERT hits a NOT NULL
violation on message_type, causing an infinite retry loop.
Layered fix:
- CloudEventsMapper: preserve raw CloudEvent type on envelope before
attempting resolution, so the original type identity survives for
dead-letter persistence
- MoveToErrorQueue: add fallback guard that assigns a sentinel
message type (unknown/{ExceptionName}) when Message is null and
MessageType was never set
- DatabasePersistence: null-coalesce MessageType to "unknown" in the
dead-letter INSERT as a belt-and-suspenders defense
3889b54 to
56513a5
Compare
Member
|
Yuck, yeah, I'll get this in now. Thank you! |
This was referenced Mar 17, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…CloudEvents with unregistered types
When a Kafka CloudEvents message arrives with an unregistered
type, CloudEventsMapper throws UnknownMessageTypeNameException before setting envelope.MessageType. The subsequent dead-letter INSERT hits a NOT NULL violation on message_type, causing an infinite retry loop.Layered fix:
Triggered by #2308 .