Skip to content

LIBRARIES-1638 - Add x-queue-type support and drop lazy support (now unsupported by rabbit)#19

Open
fegbers wants to merge 18 commits into
masterfrom
LIBRARIES-1638
Open

LIBRARIES-1638 - Add x-queue-type support and drop lazy support (now unsupported by rabbit)#19
fegbers wants to merge 18 commits into
masterfrom
LIBRARIES-1638

Conversation

@fegbers

@fegbers fegbers commented Jul 1, 2026

Copy link
Copy Markdown
Member

Breaking Change: Starting with this version, the quorum queues are the new default => The queue declaration changes, so the queues must be recreated when the version number is incremented. In addition, “Lazy” support has been removed, since Rabbit is also removing it.

Copilot AI review requested due to automatic review settings July 1, 2026 07:58
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
  • Documentation added or updated?

    • Diff-Links as response added?
      • Not necessary
      • Added
  • Breaking-Change present?

    • Necessary deployment adjustments added as a comment (Ticket)?
      • Not necessary
      • Added
    • Necessary rollback adjustments added as a comment (Ticket)?
      • Not necessary
      • Added

Copilot AI 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.

Pull request overview

This PR updates queue declaration behavior to support the x-queue-type argument and removes the previous “lazy queue mode” usage, aligning tests and example configurations accordingly. It also bumps the project version to 3.0.0-RC1 and updates a test dependency.

Changes:

  • Add x-queue-type handling to queue/DLX queue creation and update tests to assert the new argument.
  • Update test application property sets to use arguments[x-queue-type] and remove x-queue-mode/queue-mode usage.
  • Bump project version to 3.0.0-RC1 and update springtainer-rabbitmq version.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/com/avides/spring/rabbit/configuration/creator/QueueCreator.java Adds x-queue-type constants and injects a default queue type into queue arguments.
src/main/java/com/avides/spring/rabbit/configuration/creator/DlxQueueCreator.java Replaces x-queue-mode=lazy with x-queue-type resolution for DLX queues.
src/test/resources/application-queueManagementWithOneConnectionFactory.properties Removes lazy config and adds arguments[x-queue-type]=classic for queue one.
src/test/resources/application-multipleConnectionFactories.properties Fixes routing key index and adds arguments[x-queue-type]=classic; removes lazy arg.
src/test/java/com/avides/spring/rabbit/configuration/SpringRabbitAutoConfigurationForQueueManagementWithOneConnectionFactoryIT.java Updates assertions for x-queue-type and argument counts.
src/test/java/com/avides/spring/rabbit/configuration/SpringRabbitAutoConfigurationForMultipleConnectionFactoriesIT.java Updates assertions for x-queue-type and removes lazy expectations.
src/test/java/com/avides/spring/rabbit/configuration/creator/QueueCreatorTest.java Updates expected argument map and adds an override test for queue type.
src/test/java/com/avides/spring/rabbit/configuration/creator/DlxQueueCreatorTest.java Updates expected DLX args and adds an override test for queue type.
README.md Updates the documented dependency version to 3.0.0-RC1.
pom.xml Bumps project version, adds a developer entry, and updates springtainer-rabbitmq version.
Comments suppressed due to low confidence (1)

src/main/java/com/avides/spring/rabbit/configuration/creator/QueueCreator.java:53

  • Defaulting x-queue-type to "quorum" for all queues can produce invalid declarations when users configure non-quorum-compatible flags (e.g., durable=false or exclusive=true). RabbitMQ rejects quorum queues that are non-durable and/or exclusive, so this can turn previously-valid configurations into runtime failures unless users explicitly set x-queue-type=classic.
    private Map<String, Object> createArguments()
    {
        Map<String, Object> arguments = new HashMap<>(queueProperties.getArguments());
        arguments.putIfAbsent(X_QUEUE_TYPE, DEFAULT_X_QUEUE_TYPE);
        arguments.put("x-dead-letter-exchange", "");
        arguments.put("x-dead-letter-routing-key", queueProperties.getName() + ".dlx");
        arguments.put("x-max-length", Long.valueOf(queueProperties.getLimit()));
        return arguments;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +43
private String resolveQueueType()
{
if (queueProperties.getArguments() != null && queueProperties.getArguments().get(X_QUEUE_TYPE) != null)
{
return (String) queueProperties.getArguments().get(X_QUEUE_TYPE);
}
return DEFAULT_X_QUEUE_TYPE;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It has to fail quickly, and we don't want to implement the “Rabbit” logic twice.

Copilot AI review requested due to automatic review settings July 1, 2026 08:02

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Comment on lines +48 to 52
Map<String, Object> arguments = new HashMap<>(queueProperties.getArguments());
arguments.putIfAbsent(X_QUEUE_TYPE, DEFAULT_X_QUEUE_TYPE);
arguments.put("x-dead-letter-exchange", "");
arguments.put("x-dead-letter-routing-key", queueProperties.getName() + ".dlx");
arguments.put("x-max-length", Long.valueOf(queueProperties.getLimit()));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It has to fail quickly, and we don't want to implement the “Rabbit” logic twice.

Comment on lines +36 to +43
private String resolveQueueType()
{
if (queueProperties.getArguments() != null && queueProperties.getArguments().get(X_QUEUE_TYPE) != null)
{
return (String) queueProperties.getArguments().get(X_QUEUE_TYPE);
}
return DEFAULT_X_QUEUE_TYPE;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It has to fail quickly, and we don't want to implement the “Rabbit” logic twice.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 08:25

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/nightly.yml Outdated
Copilot AI review requested due to automatic review settings July 1, 2026 08:37

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/review.yml
Copilot AI review requested due to automatic review settings July 2, 2026 22:00

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment on lines +48 to +49
Map<String, Object> arguments = new HashMap<>(queueProperties.getArguments());
arguments.putIfAbsent(X_QUEUE_TYPE, DEFAULT_X_QUEUE_TYPE);
Copilot AI review requested due to automatic review settings July 2, 2026 22:18

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/release.yml:9

  • The release workflow is configured to run only on pushes to the feature branch LIBRARIES-1638, while the inline comment says it should run on the master branch. As written, releases won’t trigger from master (and could trigger unexpectedly from that feature branch).
on:
  push:
    branches:
      # Runs only on push to the master branch
      - master

Comment thread pom.xml Outdated
Copilot AI review requested due to automatic review settings July 2, 2026 22:21
@avides avides deleted a comment from github-actions Bot Jul 3, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

private Map<String, Object> createArguments()
{
Map<String, Object> arguments = queueProperties.getArguments();
Map<String, Object> arguments = new HashMap<>(queueProperties.getArguments());
Comment on lines +50 to +53
java-version: ${{ steps.determine_java_version.outputs.detected_java_version }}
server-id: central
server-username: OS_CENTRAL_USERNAME
server-password: OS_CENTRAL_PASSWORD
Comment thread README.md Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 09:54

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment on lines +73 to 80
# Check if reminder comment is already given
- name: find-reminder-comment
uses: peter-evans/find-comment@v4
id: find_reminder_comment
with:
issue-number: ${{ github.event.number }}
body-includes: "Confluence/GitHub documentation added or updated?"

Comment thread .github/workflows/review.yml
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

# Get the current project version from pom.xml
- name: get-project-version
id: get_project_version
uses: avides/actions-project-version-check@v2
# Get the current project version from pom.xml
- name: get-project-version
id: get_project_version
uses: avides/actions-project-version-check@v2
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GPR_TOKEN }}
uses: softprops/action-gh-release@v2
# Verify project version is updated
- name: project-version-check
uses: avides/actions-project-version-check@v1
uses: avides/actions-project-version-check@v2

# Check if reminder comment is already given
- name: find-reminder-comment
uses: peter-evans/find-comment@v4
-Dsonar.login=${SONAR_TOKEN} \
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar \
-Dsonar.host.url=${{ secrets.OS_SONAR_HOST_URL }} \
-Dsonar.token=${{ secrets.OS_SONAR_TOKEN }} \
-Dsonar.host.url=${SONAR_HOST} \
-Dsonar.login=${SONAR_TOKEN} \
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar \
-Dsonar.host.url=${{ secrets.OS_SONAR_HOST_URL }} \
-Dsonar.login=${SONAR_TOKEN} \
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar \
-Dsonar.host.url=${{ secrets.OS_SONAR_HOST_URL }} \
-Dsonar.token=${{ secrets.OS_SONAR_TOKEN }} \
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
-Dsonar.pullrequest.key=${{ github.event.number }} \
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar \
-Dsonar.host.url=${{ secrets.OS_SONAR_HOST_URL }} \
Comment thread .github/workflows/review.yml Fixed
Copilot AI review requested due to automatic review settings July 10, 2026 11:03

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/review.yml
@avides avides deleted a comment from github-actions Bot Jul 10, 2026
-Dsonar.pullrequest.key=${{ github.event.number }} \
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:5.5.0.6356:sonar \
-Dsonar.host.url=${{ secrets.OS_SONAR_HOST_URL }} \
-Dsonar.token=${{ secrets.OS_SONAR_TOKEN }} \
@avides avides deleted a comment from github-actions Bot Jul 10, 2026
@avides avides deleted a comment from github-actions Bot Jul 10, 2026
Copilot AI review requested due to automatic review settings July 10, 2026 11:14

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

# Update GitHub Action configuration if necessary
- name: action-configuration-autoupdate
uses: avides/actions-action-configuration-autoupdate@v1
uses: avides/actions-action-configuration-autoupdate@v2

# Push updated GitHub Actions configuration if necessary
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v7
@fegbers fegbers requested review from julian-eggers and sdaus July 10, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants