Skip to content

Fix #378: Rename Spring RabbitMQ properties to forage.rabbitmq.*#379

Open
JiriOndrusek wants to merge 1 commit into
KaotoIO:mainfrom
JiriOndrusek:rabbitmq-following-naming-conventions
Open

Fix #378: Rename Spring RabbitMQ properties to forage.rabbitmq.*#379
JiriOndrusek wants to merge 1 commit into
KaotoIO:mainfrom
JiriOndrusek:rabbitmq-following-naming-conventions

Conversation

@JiriOndrusek

@JiriOndrusek JiriOndrusek commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #378

Rename Spring RabbitMQ property prefix from forage.spring.rabbitmq.* to forage.rabbitmq.* to align
with the established forage..* naming convention

  • Replace hardcoded "spring.rabbitmq" strings in SpringRabbitMQBeanFactory with
    SpringRabbitMQConstants.MODULE_PREFIX
  • Update website documentation, test templates, and test regex patterns

Summary by CodeRabbit

  • Refactor

    • Updated RabbitMQ configuration property namespace from forage.spring.rabbitmq.* to forage.rabbitmq.* across all configuration settings (host, port, username, password, virtual host, cache settings, and connection options).
  • Documentation

    • Updated configuration examples and references to reflect the new property naming scheme.

….rabbitmq.* to forage.rabbitmq.*

Align Spring RabbitMQ property naming with the established forage convention
(forage.<technology>.<property>) used by all other modules (jdbc, jms, openai, etc.).
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR aligns the Spring RabbitMQ module's configuration property namespace with forage's naming convention by renaming all properties from forage.spring.rabbitmq.* to forage.rabbitmq.*. The change flows through the module constant, configuration entries, bean factory runtime behavior, test properties, and user documentation.

Changes

Property Namespace Alignment

Layer / File(s) Summary
Constants and Configuration Entries
library/messaging/.../SpringRabbitMQConstants.java, library/messaging/.../SpringRabbitMQConfigEntries.java
MODULE_PREFIX constant changed from "spring.rabbitmq" to "rabbitmq". All ConfigModule definitions for host, port, credentials, cache settings, and recovery options updated to reference the new namespace.
Bean Factory Prefix Discovery
library/messaging/.../SpringRabbitMQBeanFactory.java
cleanup() and configure() methods now derive named-connection-factory prefix patterns from MODULE_PREFIX constant instead of hard-coded "spring.rabbitmq" string literal.
Test Properties Templates and Class Overrides
integration-tests/messaging/src/test/resources/.../forage-spring-rabbitmq.properties.template (3 files), integration-tests/messaging/src/test/java/.../SpringRabbitMQ*Test.java (3 files)
Properties templates and dynamic template substitution logic in test classes updated to use forage.rabbitmq.*, forage.mq1.rabbitmq.*, and forage.primary/backup.rabbitmq.* prefixes for all broker connection and caching settings.
Default Properties File Template
library/messaging/.../forage-spring-rabbitmq.properties
Commented configuration examples renamed from forage.spring.rabbitmq.* to forage.rabbitmq.* namespace.
Documentation and Javadoc
library/messaging/.../ForageSpringRabbitMQAutoConfiguration.java, website/docs/modules/spring-rabbitmq.md
Quick Start, Multi-broker, Cluster Failover, and Cache Modes configuration examples updated to reference forage.rabbitmq.* property names; Javadoc examples and fallback-condition descriptions also updated.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • KaotoIO/forage#362: Introduced the Spring RabbitMQ module implementation and bean factory logic that is being refactored in this PR.
  • KaotoIO/forage#374: Refactored SpringRabbitMQ integration tests to use properties template files, which are now being renamed in this PR.

Suggested reviewers

  • orpiske
  • Croway

Poem

🐰 From spring.rabbitmq we hare away,
To rabbitmq's convention, hip hooray!
No framework name in properties' way,
Just forage.tech now leads the day!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: renaming Spring RabbitMQ properties from forage.spring.rabbitmq.* to forage.rabbitmq.* to match naming conventions, directly addressing the linked issue #378.
Linked Issues check ✅ Passed The PR fully addresses issue #378 by renaming property prefixes from forage.spring.rabbitmq.* to forage.rabbitmq.* across all affected files (configuration entries, constants, bean factory, test templates, documentation) and establishing naming convention compliance.
Out of Scope Changes check ✅ Passed All changes are directly related to renaming Spring RabbitMQ properties to follow forage..* naming conventions. No unrelated modifications were introduced outside the scope of issue #378.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JiriOndrusek JiriOndrusek requested a review from orpiske June 4, 2026 08:46

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
integration-tests/messaging/src/test/java/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQNamedTest.java (1)

25-25: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the Javadoc to reflect the new property namespace.

The Javadoc comment still references the old property pattern forage.mq1.spring.rabbitmq.host, but the code has been updated to use forage.mq1.rabbitmq.host. This creates a documentation inconsistency.

📝 Proposed fix
- * Verifies that prefixed properties (e.g., {`@code` forage.mq1.spring.rabbitmq.host})
+ * Verifies that prefixed properties (e.g., {`@code` forage.mq1.rabbitmq.host})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@integration-tests/messaging/src/test/java/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQNamedTest.java`
at line 25, The Javadoc on the SpringRabbitMQNamedTest class refers to the old
property namespace forage.mq1.spring.rabbitmq.host; update that comment to the
current property namespace forage.mq1.rabbitmq.host so the Javadoc matches the
code and test expectations (search for SpringRabbitMQNamedTest and the Javadoc
line mentioning forage.mq1.spring.rabbitmq.host and replace it accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@integration-tests/messaging/src/test/java/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQNamedTest.java`:
- Line 25: The Javadoc on the SpringRabbitMQNamedTest class refers to the old
property namespace forage.mq1.spring.rabbitmq.host; update that comment to the
current property namespace forage.mq1.rabbitmq.host so the Javadoc matches the
code and test expectations (search for SpringRabbitMQNamedTest and the Javadoc
line mentioning forage.mq1.spring.rabbitmq.host and replace it accordingly).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2bd89152-9b92-4f11-854f-30d1e6ca2930

📥 Commits

Reviewing files that changed from the base of the PR and between 8ca9395 and bdde7bb.

📒 Files selected for processing (12)
  • integration-tests/messaging/src/test/java/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQHealthMetricsTest.java
  • integration-tests/messaging/src/test/java/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQNamedTest.java
  • integration-tests/messaging/src/test/java/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQTest.java
  • integration-tests/messaging/src/test/resources/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQHealthMetricsTest/forage-spring-rabbitmq.properties.template
  • integration-tests/messaging/src/test/resources/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQNamedTest/forage-spring-rabbitmq.properties.template
  • integration-tests/messaging/src/test/resources/io/kaoto/forage/messaging/springrabbitmq/SpringRabbitMQTest/forage-spring-rabbitmq.properties.template
  • library/messaging/forage-spring-rabbitmq-common/src/main/java/io/kaoto/forage/messaging/spring/rabbitmq/common/SpringRabbitMQConfigEntries.java
  • library/messaging/forage-spring-rabbitmq-common/src/main/java/io/kaoto/forage/messaging/spring/rabbitmq/common/SpringRabbitMQConstants.java
  • library/messaging/forage-spring-rabbitmq/src/main/java/io/kaoto/forage/messaging/spring/rabbitmq/SpringRabbitMQBeanFactory.java
  • library/messaging/forage-spring-rabbitmq/src/main/resources/forage-spring-rabbitmq.properties
  • library/messaging/spring-boot/forage-spring-rabbitmq-starter/src/main/java/io/kaoto/forage/springboot/messaging/springrabbitmq/ForageSpringRabbitMQAutoConfiguration.java
  • website/docs/modules/spring-rabbitmq.md

@orpiske orpiske left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. I'll have to remember to adjust some stuff on Wanaku, but it looks much better this way. Thanks

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.

Spring RabbitMQ properties don't follow forage.<technology>.* naming convention

3 participants