Skip to content
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

fix: rabbitmq bindings and auto-generated queues #14129

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

EeeasyCode
Copy link
Contributor

@EeeasyCode EeeasyCode commented Nov 11, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Currently, when creating a new microservice with @nestjs/microservices for RMQ, using an empty string for the queue name creates a queue named default rather than a unique, exclusive queue. Additionally, binding a queue to an exchange specified by exchange and routingKey does not occur as expected.

Issue Number: #13931

What is the new behavior?

This PR modifies the default queue name behavior to use an auto-generated name when an empty string is provided. It also implements automatic binding of the queue to the specified exchange and routing key, aligning with standard RabbitMQ behavior.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This PR also includes updates to the microservices package documentation, detailing the new exchange and routingKey options and their behavior to ensure users have clear guidance on setting up RMQ queues and exchanges in alignment with RabbitMQ standards.

스크린샷 2024-11-11 오전 3 08 25 스크린샷 2024-11-11 오전 3 08 48 스크린샷 2024-11-11 오전 3 08 54

@coveralls
Copy link

Pull Request Test Coverage Report for Build b6c85c24-7c65-4e65-a253-40dfa5c0e6b8

Details

  • 3 of 6 (50.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 92.207%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/microservices/client/client-rmq.ts 1 2 50.0%
packages/microservices/server/server-rmq.ts 1 3 33.33%
Totals Coverage Status
Change from base Build 72f148bc-4145-44b3-a3c4-06a616307114: -0.04%
Covered Lines: 6756
Relevant Lines: 7327

💛 - Coveralls

Copy link

@eljabriyassine eljabriyassine left a comment

Choose a reason for hiding this comment

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

yes that a good idea the check

@kamilmysliwiec kamilmysliwiec modified the milestones: 10.0.0, 11.0.0 Nov 12, 2024
@kamilmysliwiec kamilmysliwiec changed the base branch from master to 11.0.0 November 18, 2024 08:38
@kamilmysliwiec kamilmysliwiec merged commit ca86bf6 into nestjs:11.0.0 Nov 18, 2024
3 checks passed
@EeeasyCode
Copy link
Contributor Author

@kamilmysliwiec
Thank you for merge my contribution.

@kamilmysliwiec kamilmysliwiec mentioned this pull request Nov 20, 2024
12 tasks
@injae-kim
Copy link

Nice work @EeeasyCode!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants