[#5] Implement command service skeleton with Kafka producer#117
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Implements the MVP command-service skeleton for the backend CQRS flow, adding a WebFlux command endpoint that turns login commands into UserLoggedInEvents and publishes them to Kafka.
Changes:
- Added login command controller/service, Kafka topic configuration, publish exception handling, and temporary in-memory event storage.
- Added unit tests for controller success flow and service publish/store behavior.
- Updated module README and workflow documentation for branch naming and issue progress.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
START_HERE.md |
Updates branch naming guidance. |
GITHUB_ISSUES_PLAN.md |
Marks issue #5 subtasks complete and updates branch strategy. |
CONTRIBUTING.md |
Expands mandatory branch naming convention. |
AGENTS.md |
Aligns agent guidance with branch naming convention. |
backend/command-service/README.md |
Documents command-service run, quick check, and test steps. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/CommandServiceApplication.java |
Enables configuration properties scanning. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/api/CommandController.java |
Adds POST /commands/user/login. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/api/GlobalExceptionHandler.java |
Adds API error handling. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/config/KafkaTopicsProperties.java |
Adds externalized Kafka topic properties. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/repository/InMemoryEventStorage.java |
Adds temporary in-memory event storage. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/service/CommandPublishException.java |
Adds publish failure exception type. |
backend/command-service/src/main/java/lt/satsyuk/distributed/audit/command/service/UserLoginCommandService.java |
Creates and publishes login events, then stores accepted events. |
backend/command-service/src/test/java/lt/satsyuk/distributed/audit/command/api/CommandControllerTest.java |
Adds controller success-flow unit test. |
backend/command-service/src/test/java/lt/satsyuk/distributed/audit/command/service/UserLoginCommandServiceTest.java |
Adds service publish/store and failure tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
Copilot stopped work on behalf of
igorsatsyuk due to an error
May 15, 2026 09:28
…, add subscribeOn for Kafka threading, document prerequisites
This was referenced May 15, 2026
This was
linked to
issues
May 15, 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.
Description
Implements Issue #5 MVP skeleton for
command-service.What was added
POST /commands/user/loginUserLoggedInEventto topicuser.login.eventsCommandResponseenvelope)Docs/process alignment included
<type>/#XX-description(feature|fix|docs|test)Closes
Related
Checklist
Testing