-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Topic exchanges support for RabbitMQ (routing) #14535
Comments
The built-in RabbitMQ transporter uses This sounds like a useful feature though, I'll look into that soon |
I also tested using
also changing |
Because your queue isn't bound to that routing key - I'll make sure to include that in the PR |
the queue and the routing key are the same, both are |
Let's track this here #14540 |
wow! this is interesting! @kamilmysliwiec this PR solves one issue: the topic exchange (I'm waiting for the full merge to give it a go) still, there is another issue, routing a message to an existing pattern using the HTTP API or RabbitMQ UI causes steps
request
response:
Nest Logs:
|
Is there an existing issue for this?
Current behavior
I created a microservice using
NestFactory.createMicroservice
and added a@EventPattern
like thisnavigating to RabbitMQ UI, I can see the queue created successfully and bind to the default channel, but when I try to publish a message from there
RabbitMQ tells that the message is routed, but I always get
ERROR [Server] There is no matching event handler defined in the remote service. Event pattern: msg
I tried to create a minimal repo, but the app doesn't continue after
app.listen()
statement, I,.eapp2
never loggedanyway, I just created a basic microservice in a totally new app
https://stackblitz.com/edit/nestjs-typescript-starter-qknpqrbp?file=src%2Fmain.ts
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-qknpqrbp?file=src%2Fmain.ts
Steps to reproduce
1- replace
NestFactory.create()
withNestFactory.createMicroservice()
and provideurls
andqueue
2- navigate to the RabbitMQ management UI to confirm the queue is created
3- publish a message from the created queue in RabbitMQ UI, the message is routed
4- NestJs logs an error that the pattern has not defined
Expected behavior
the message is catched by
@EventPattern('msg')
or even@EventPattern('*')
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
11.0.6
Packages versions
"@nestjs/core": "^11.0.6"
Node.js version
v22.12.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: