proposed changes#34
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the project version from 0.0.0-b10 to 0.0.0-b11-SNAPSHOT and performs a significant code reorganization by moving worker classes from the io.aleph0.yap.messaging.core package to a new worker subpackage. The refactoring also introduces new abstractions and helper classes to support message processing workflows.
- Version bumped to
0.0.0-b11-SNAPSHOTacross all POM files - Worker classes moved to
workersubpackages for better organization - New worker abstractions and utilities added for message processing patterns
Reviewed Changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml files (multiple) | Version updates from 0.0.0-b10 to 0.0.0-b11-SNAPSHOT |
| Java classes (multiple) | Package reorganization moving worker classes to worker subpackages |
| Test classes (multiple) | Import updates to reflect new worker package structure |
| SplitGateProcessorWorker.java | Moved to worker package with enhanced implementation |
| New worker classes | Added AcknowledgingProcessorWorker, AcknowledgingMessageBodyProcessorWorker, and others |
| New acknowledger classes | Added Acknowledger interface, DefaultAcknowledger, and NopAcknowledger |
| MapMultiProcessorWorker.java | New generic processor for one-to-many mappings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * mapping in the mapped message | ||
| * @param mappedBody the body of the mapped message, which is the result of the mapping operation | ||
| * and must be used as the body of the new mapped message | ||
| * @param acknwoledgeable The object to use to ack or nack the new message |
There was a problem hiding this comment.
Corrected spelling of 'acknwoledgeable' to 'acknowledgeable'.
| * @return the new message | ||
| */ | ||
| protected Message<Y> newMappedMessage(String originalId, Map<String, String> originalAttributes, | ||
| X originalBody, Y mappedBody, Acknowledgeable acknwoledgeable) { |
There was a problem hiding this comment.
Corrected spelling of 'acknwoledgeable' to 'acknowledgeable'.
| public void ack(AcknowledgementListener listener) { | ||
| final boolean updated = acked.compareAndSet(false, true); | ||
| if (updated) { | ||
| acknwoledgeable.ack(listener); |
There was a problem hiding this comment.
Corrected spelling of 'acknwoledgeable' to 'acknowledgeable'.
| public void nack(AcknowledgementListener listener) { | ||
| final boolean updated = acked.compareAndSet(false, true); | ||
| if (updated) { | ||
| acknwoledgeable.nack(listener); |
There was a problem hiding this comment.
Corrected spelling of 'acknwoledgeable' to 'acknowledgeable'.
| @Override | ||
| public void ack(AcknowledgementListener listener) { | ||
| final boolean updated = acknowledged.compareAndSet(false, true); | ||
| if (updated == true) { |
There was a problem hiding this comment.
The comparison updated == true is redundant. The variable updated is already a boolean, so the condition can be simplified to if (updated).
| @Override | ||
| public void nack(AcknowledgementListener listener) { | ||
| final boolean updated = acknowledged.compareAndSet(false, true); | ||
| if (updated == true) { |
There was a problem hiding this comment.
The comparison updated == true is redundant. The variable updated is already a boolean, so the condition can be simplified to if (updated).
| if (updated == true) { | |
| if (updated) { |
| */ | ||
| @Override | ||
| public void close() throws InterruptedException, ExecutionException { | ||
| if (closed.compareAndSet(false, true) == true) { |
There was a problem hiding this comment.
The comparison with == true is redundant. The compareAndSet method already returns a boolean, so the condition can be simplified to if (closed.compareAndSet(false, true)).
| if (closed.compareAndSet(false, true) == true) { | |
| if (closed.compareAndSet(false, true)) { |
…worker/SplitGateProcessorWorker.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…worker/SplitGateProcessorWorker.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ailure in rare cases, update logging
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 43 out of 44 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.