Connecting to external broker through restricted network using Paho Java Client

648 views Asked by At

My client is using a restricted network i.e it's behind a firewall which permits requests to only 443 port. So it does not allow the client to connect to any other port that my mqtt broker is running on.

Is there any way to connect to target broker running on random port like 12000 with such network restrictions using Paho java client?

I think I will have to start a proxy which will route mqtt connect request to target ip and port but I am not sure how to do that.

Please help me out and let me know how can I achieve this

1

There are 1 answers

0
hardillb On

You should be able to start a broker listening on any port you want. How you do this will vary depending on which broker you are using.

A second option may be connecting to the broker using MQTT over Websockets. This would allow you to use the existing HTTP proxy on the network, but I'm not aware of any client libraries (except the Paho Javascript client for use in web pages) that currently support this.