-
Notifications
You must be signed in to change notification settings - Fork 1
Release/v1.3.0 #57
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
Release/v1.3.0 #57
Conversation
Reviewer's GuideThis PR prepares the v1.3.0 release by introducing extensive Javadoc documentation on public classes and methods, enforcing immutability and consistent constructor injection, applying uniform code formatting across Vert.x components, and updating Gradle build scripts to bump versions, add Maven publishing support, and refine POM metadata. Class diagram for updated VertxConsumerServer and VertxPersistentConsumerclassDiagram
class VertxConsumerServer {
- DataSource ds
- List<AutoCloseable> closeables
- AsyncExecutor asyncExecutor
- OpenTelemetry ot
+ VertxConsumerServer(DataSource ds, AsyncExecutor asyncExecutor, OpenTelemetry ot)
+ void start(EventBus eb, EventBusMessageBroker mb, Set<String> topics)
+ void close()
}
class VertxPersistentConsumer {
- AsyncExecutor asyncExecutor
- OpenTelemetry ot
- int batchSize
+ VertxPersistentConsumer(OpenTelemetry ot, AsyncExecutor asyncExecutor, int batchSize)
+ void start(Set<String> topics, DataSource ds, EventBus eb, EventBusMessageBroker mb)
+ void close()
}
VertxConsumerServer --> AsyncExecutor
VertxConsumerServer --> DataSource
VertxConsumerServer --> OpenTelemetry
VertxPersistentConsumer --> AsyncExecutor
VertxPersistentConsumer --> OpenTelemetry
VertxPersistentConsumer --> DataSource
Class diagram for updated EventBusCatchupService and EventCodecclassDiagram
class EventBusCatchupService {
+ static String FETCH_EVENTS_ADDRESS
+ static String GET_LATEST_MESSAGE_ID_ADDRESS
- CatchupServerInterface catchupServer
- EventBus eventBus
- Set<String> topics
- AsyncExecutor executor
+ EventBusCatchupService(CatchupServerInterface catchupServer, EventBus eventBus, Set<String> topics, AsyncExecutor executor)
+ void start()
+ void close()
}
class EventCodec {
+ EventCodec()
+ void encodeToWire(Buffer buffer, Event event)
+ Event decodeFromWire(int pos, Buffer buffer)
}
EventBusCatchupService --> CatchupServerInterface
EventBusCatchupService --> EventBus
EventBusCatchupService --> AsyncExecutor
EventCodec --> Event
Class diagram for updated EventBusMessageBrokerclassDiagram
class EventBusMessageBroker {
- Map<String, List<MessageConsumer<Event>>> consumers
+ void subscribeToEventBus(String topic, MessageSubscriber<Event> subscriber)
+ void unsubscribe(String topic)
+ void close()
}
EventBusMessageBroker --> MessageConsumer
EventBusMessageBroker --> MessageSubscriber
EventBusMessageBroker --> Event
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes - here's some feedback:
- Replace the System.out.println call with structured logging to keep output consistent and configurable.
- Avoid swallowing exceptions in empty catch blocks during resource cleanup—at minimum log the exception to help diagnose potential shutdown issues.
- Consider separating large formatting and Javadoc additions from functional changes into distinct commits or PRs to make reviews more focused and manageable.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Replace the System.out.println call with structured logging to keep output consistent and configurable.
- Avoid swallowing exceptions in empty catch blocks during resource cleanup—at minimum log the exception to help diagnose potential shutdown issues.
- Consider separating large formatting and Javadoc additions from functional changes into distinct commits or PRs to make reviews more focused and manageable.
## Individual Comments
### Comment 1
<location> `vertx/src/main/java/com/p14n/postevent/vertx/VertxConsumerServer.java:67` </location>
<code_context>
+ var catchupService = new EventBusCatchupService(catchupServer, eb, topics, this.asyncExecutor);
closeables = List.of(catchupService, mb, asyncExecutor);
System.out.println("🌐 Vert.x EventBus server started");
</code_context>
<issue_to_address>
**suggestion:** Replace System.out.println with structured logging.
Switch to logger.atInfo().log(...) for improved consistency and observability.
```suggestion
logger.atInfo().log("🌐 Vert.x EventBus server started");
```
</issue_to_address>
### Comment 2
<location> `vertx/src/main/java/com/p14n/postevent/vertx/VertxConsumerServer.java:77` </location>
<code_context>
try {
c.close();
- } catch (Exception e){
+ } catch (Exception e) {
}
</code_context>
<issue_to_address>
**issue (bug_risk):** Swallowing exceptions in close() may hide resource cleanup issues.
Logging exceptions in the catch block will help identify resource leaks and improve reliability.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| var catchupService = new EventBusCatchupService(catchupServer, eb, topics, this.asyncExecutor); | ||
|
|
||
| closeables = List.of(catchupService, mb, asyncExecutor); | ||
| System.out.println("🌐 Vert.x EventBus server started"); |
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.
suggestion: Replace System.out.println with structured logging.
Switch to logger.atInfo().log(...) for improved consistency and observability.
| System.out.println("🌐 Vert.x EventBus server started"); | |
| logger.atInfo().log("🌐 Vert.x EventBus server started"); |
| try { | ||
| c.close(); | ||
| } catch (Exception e){ | ||
| } catch (Exception e) { |
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.
issue (bug_risk): Swallowing exceptions in close() may hide resource cleanup issues.
Logging exceptions in the catch block will help identify resource leaks and improve reliability.
Summary by Sourcery
Prepare for v1.3.0 release by bumping module versions, adding Maven Central publishing configuration, improving documentation, and cleaning up Vert.x module code
Enhancements:
Build:
Documentation: