Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rabbitmq in NAT environment

Tags:

rabbitmq

I have a distributed system with client-server style as following:

1.Server A deployed on Cloud
2.Many Client C1-CN deployed in customer ENV,which may be behind NAT.
3.Server A need to Notify Client to do some operations.

I have surveyed a little on RabbitMQ,basically i want to know whether it will work as:

1.Server A publish event to RabbitMQ queue(each queue for each client)
2.Once event published, Client will get notified and do some operations by parse the message?
like image 507
Simon Wang Avatar asked Mar 25 '26 20:03

Simon Wang


1 Answers

If I understand you correctly you have many client programs that need to be notified of something. These clients will be behind a firewall so you cannot directly connect to them from the server.

Yes RabbitMQ will work. Set it up on your server and make sure it is reachable over the internet (you will have to open port 5762 in your firewall. Make sure there is some security regarding connections to the MQ server so that only the clients you want can connect to it. You will then publish messages to the MQ server, presumably to an exchange that will be responsible for distributing messages to the queues. Your clients will connect to RabbitMQ and consume a queue. They should consume in a Thread that will wait for messages to come in and process them as needed.

like image 127
robthewolf Avatar answered Mar 29 '26 03:03

robthewolf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!