-
Notifications
You must be signed in to change notification settings - Fork 3
Fix in SpringApplicationEventsMessageService message events creation #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e constants for header keys and add a new constructor for MessageEvent
…MessageService constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request fixes a bug in the SpringApplicationEventsMessageService where MessageEvent objects were being created with incorrect parameter ordering. The version has been bumped from 5.4.13 to 5.4.14 across all modules.
Key changes:
- Corrected MessageEvent instantiation to pass parameters in the correct order (topic, callback instead of channel, topic)
- Added string constants for header keys to reduce magic strings
- Added a new constructor overload to MessageEvent for convenience
- Removed @component and @Autowired annotations from SpringApplicationEventsMessageService
- Version bump across all Maven modules from 5.4.13 to 5.4.14
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| integration/src/main/java/tools/dynamia/integration/ms/SpringApplicationEventsMessageService.java | Fixed bug in MessageEvent creation; added constants for header keys; removed Spring annotations |
| integration/src/main/java/tools/dynamia/integration/ms/MessageEvent.java | Added new 2-parameter constructor for convenience |
| integration/pom.xml | Version bump to 5.4.14 |
| pom.xml | Parent version bump to 5.4.14 |
| All other pom.xml files | Version updates across all modules to maintain consistency |
| */ | ||
| @Component | ||
|
|
||
| public class SpringApplicationEventsMessageService implements MessageService { |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @component annotation has been removed from this class, which means it will no longer be automatically detected and registered as a Spring bean through component scanning. This is a breaking change that will require users to manually configure this bean in their Spring configuration. If this is intentional (to allow more flexible configuration), consider documenting this change and providing configuration examples. If not, the @component annotation should be restored.
|
|
||
| @Autowired | ||
|
|
||
| public SpringApplicationEventsMessageService(ApplicationEventPublisher eventPublisher) { |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @Autowired annotation has been removed from this constructor. While constructor injection in Spring does not strictly require @Autowired when there is only one constructor (Spring will use it automatically), removing this annotation may reduce code clarity for readers and could cause issues if another constructor is added later. Consider keeping the @Autowired annotation for explicit documentation of the dependency injection intent.
No description provided.