I'm not sure it is supported in NestJs out of the box .. But you can always use "amqplib", which is a rabbitmq library and client (that nest uses behind the scenes) Package: www.npmjs.com/package/amqplib You can create your own exchanges of any type, including fanout (e.g : channel.assertExchange("exchange-name", "fanout", {...options}) (amqp-node.github.io/amqplib/channel_api.html#channel_assertExchange) I have a video where we create our own rabbitMQ client that uses amqplib in Node (ua-cam.com/video/igaVS0S1hA4/v-deo.htmlsi=SlVhAcNKF3sQIIz8). This video will support you in creating your own rabbitmq implementation using that package. You just have to replace the exchange type with "fanout" and make any necessary changes! I wish you good luck !
يعطيك العافية، شرحك ممتاز وواضح. I wish you would do more in detail examples about RabbitMQ with NestJs. Explaining some microservice principles and such.
Honestly, I didn't give it much thought while filming the video, but I did deploy them under one repo on github : github.com/charbelh3/NestJs-Microservice-RabbitMQ Hope you find the video beneficial :)
Yes, as long as you're connecting your microservice project (the consumer) to the same rabbitMQ server, and listen on the queue, you will receive the messages successfully
Thank you. Now I got the understanding of rabbit mq. Keep going
Thanks for your video. Do you know how to implement fanout exchange with Nest.js ?
I can't find any documentation about this implement.
I'm not sure it is supported in NestJs out of the box .. But you can always use "amqplib", which is a rabbitmq library and client (that nest uses behind the scenes)
Package: www.npmjs.com/package/amqplib
You can create your own exchanges of any type, including fanout (e.g : channel.assertExchange("exchange-name", "fanout", {...options}) (amqp-node.github.io/amqplib/channel_api.html#channel_assertExchange)
I have a video where we create our own rabbitMQ client that uses amqplib in Node (ua-cam.com/video/igaVS0S1hA4/v-deo.htmlsi=SlVhAcNKF3sQIIz8). This video will support you in creating your own rabbitmq implementation using that package. You just have to replace the exchange type with "fanout" and make any necessary changes!
I wish you good luck !
amazing video bro👍🏻
just a little bit learning not good fit they skipping the main points
What do you mean ?
How to reject a message from a pattern event forcibly and send back to the channel
Really great demonstration and explanation! Thank you!
Amazing thanks bro!
Which keyboard do u use bro, sounds like music from heaven)
You're welcome !
Keyboard is XPG infarex K20. It does sound satisfying :)
يعطيك العافية، شرحك ممتاز وواضح.
I wish you would do more in detail examples about RabbitMQ with NestJs. Explaining some microservice principles and such.
Thanks for the feedback ! And noted!
can you please do proper error handling. with some error middleware to handle RabbitMq errors.
Thanks for the suggestion
Thank you for your great content. Keep up the good work (like)
You are first who have separated files nice job keep working
Can u build one big nestjs microservices app with rabbitmq ,redis ngnix ,docker
Thank you for the suggestion
thank you bro
You're welcome 🫡
It was simple and neat demonstration of producer and consumer. Thanks you.
You're welcome! Glad I was able to help
Thanks man for the video on this stack setup!
It just arrived in time, thank you for the share, could you please clarify why did not you use monorepo?
Honestly, I didn't give it much thought while filming the video, but I did deploy them under one repo on github : github.com/charbelh3/NestJs-Microservice-RabbitMQ
Hope you find the video beneficial :)
Also if my consumer is a seperate nestjs application running on a different port will this still workout
Yes, as long as you're connecting your microservice project (the consumer) to the same rabbitMQ server, and listen on the queue, you will receive the messages successfully
very useful❤
@@thejimbow thanks for your comment !
Thanks bro 👊
Nice thank you for sharing the knowledge liked and subscribed
You're welcome :)
Thank you for saving my day
amazing video bro, keep this great content
Thank you for your constant support ❤️
Thanks great video.
Thank you !!! The video is very helpful
I'm glad! Thanks for your comment
super bro
awesome!
this video got me through a sprint at work
I'm glad :)
Favorite UA-camr dropped new content! Can't wait to watch it :)
Thank you so much for the support ! Hope you enjoy it.
Excellent video brother. Thank you so much.
You're welcome
thank you! amazing video!
I'm glad you found it amazing :)
You are my superman
😄