Improve default message round-trip consistency by auto-discovering Jackson modules#289
Merged
sonus21 merged 1 commit intosonus21:masterfrom Mar 23, 2026
Conversation
The default mapper bootstrap only disabled unknown-property failures, so payloads that depend on Jackson module discovery could serialize on enqueue and still fail during dequeue or listener argument mapping. This change enables module auto-discovery in SerializationUtils and adds a regression test that verifies the default GenericMessageConverter round-trip path with a ServiceLoader-discovered Jackson module. Constraint: Must preserve the existing MessageConverterProvider-based extension model Rejected: Prefer Spring-managed ObjectMapper by default | changes the library's default configuration contract Confidence: medium Scope-risk: narrow Directive: If default mapper bootstrap changes again, keep equivalent regression coverage for service-loaded modules Tested: ./gradlew checkFormatJava :rqueue-core:test --tests com.github.sonus21.rqueue.converter.GenericMessageConverterTest --tests com.github.sonus21.rqueue.converter.JsonMessageConverterTest Not-tested: Cross-service producer/consumer environments with different classpaths
Owner
|
Hi @JiHongKim98 , this will merge change to version 4.x, are you using spring spring boot 4.x? |
Contributor
Author
|
@sonus21 |
Contributor
Author
|
@sonus21 I noticed that there are newer versions available on Maven Central (e.g. 3.4.1, 4.0.0-RC), Is there a reason why newer versions are not published as GitHub releases? |
Owner
|
@JiHongKim98 my bad, just published them |
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.
Description
Rqueue currently creates its default
ObjectMapperwith minimal configuration only.This can cause default enqueue/dequeue round-trip failures for payload types that
depend on Jackson modules present on the application classpath.
This PR updates the default mapper creation path to call
findAndAddModules()so that the default message conversion path is more consistent for enqueue,
dequeue, and listener argument mapping.
Changes:
SerializationUtils.createObjectMapper()to usefindAndAddModules()GenericMessageConverterround-trip pathFixes # (issue number if available)
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: