Skip to content

docs: align microservices-messaging README with actual Kafka-based implementation - #3625

Open
1wu-davy-2 wants to merge 1 commit into
iluwatar:masterfrom
1wu-davy-2:docs/fix-microservices-messaging-readme
Open

1wu-davy-2 wants to merge 1 commit into
iluwatar:masterfrom
1wu-davy-2:docs/fix-microservices-messaging-readme

Conversation

@1wu-davy-2

Copy link
Copy Markdown

Description

The "Programmatic Example" section documented an in-memory MessageBroker class with subscribe/publish methods, an OrderService(MessageBroker) constructor and a matching console output block. None of that exists in the module.

The actual implementation uses Apache Kafka:

  • There is no MessageBroker class. KafkaMessageProducer wraps a Kafka Producer, serializes each Message to JSON and publishes it to a topic.
  • OrderService takes a KafkaMessageProducer in its constructor and publishes to the order-topic constant.
  • App connects to localhost:9092, creates three KafkaMessageConsumers (inventory-group, payment-group, notification-group) on order-topic, and runs them in a thread pool.
  • The console output block was replaced with the log statements the code actually emits (abridged; message ids are omitted because they are random UUIDs).

The "How to Run" section was left unchanged: it already describes the Docker Compose / helper-script Kafka setup correctly.

Checklist

  • Only documentation change (microservices-messaging/README.md)
  • Snippets and log strings verified against App.java, OrderService.java, KafkaMessageProducer.java and the three consumer services
  • No remaining references to MessageBroker

Assisted by AI tools for initial analysis; all changes manually verified and tested.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

PR Summary

Updates the README to reflect the Kafka-based messaging implementation. Replaces the in-memory MessageBroker with Kafka-based producer/consumer concepts, shows KafkaMessageProducer, OrderService using the producer for order-topic, and App wiring KafkaMessageConsumer instances. Adjusts the console output to reflect the Kafka flow and removes references to MessageBroker.

Changes

File Summary
microservices-messaging/README.md Replaced in-memory MessageBroker example with Kafka-based producer/consumer code. Documented KafkaMessageProducer wrapping a Kafka Producer, OrderService using it to publish to order-topic, and App wiring three KafkaMessageConsumers for inventory-group, payment-group, and notification-group. Updated console/log outputs to reflect actual Kafka-based flow and removed references to MessageBroker.

autogenerated by presubmit.ai

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM!

Review Summary

Commits Considered (1)
  • 8df5f64: docs: align microservices-messaging README with actual Kafka-based implementation
Files Processed (1)
  • microservices-messaging/README.md (3 hunks)
Actionable Comments (0)
Skipped Comments (4)
  • microservices-messaging/README.md [74-87]

    best_practice: "KafkaMessageProducer snippet lacks self-contained initialization and resource management."

  • microservices-messaging/README.md [93-109]

    enhancement: "Clarify Kafka-based wiring in OrderService."

  • microservices-messaging/README.md [140-168]

    readability: "Document App wiring and lifecycle behavior."

  • microservices-messaging/README.md [173-189]

    readability: "Document console output expectations and IDs."

@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.01%. Comparing base (4cabb20) to head (8df5f64).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3625      +/-   ##
============================================
- Coverage     84.06%   84.01%   -0.05%     
+ Complexity     4353     4350       -3     
============================================
  Files          1133     1133              
  Lines         15400    15400              
  Branches        739      739              
============================================
- Hits          12946    12939       -7     
- Misses         2158     2162       +4     
- Partials        296      299       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant