B4J Question Mqtt Broker question

ilan

Expert
Licensed User
Longtime User
hi

i have created a broker like explained in this post:

but when i want to connect a client it is not clear to me how i should do it.
if i try to connect to the pc ip with tcp://10.0.0.12:51041 from my android phone it doesnot work.

for now i am trying to do it in a private network but the idea is to run the broker on my mac and connect to it from clients via public ip.

any help is very much appreciated.
thanx
 

ilan

Expert
Licensed User
Longtime User
thanks Erel for you answer.

Step 1: test it on the local pc with 127.0.0.1. It will work.
do you mean to run a b4j client from the local pc and also the broker on the same pc?
if yes, then yes this works. the connection is happening. even if i use 0.0.0.0 it connects.

but from an android device that is also connected to the same wifi i cannot connect to the pc.

Step 2: open the relevant port in windows firewall settings.
ok i will try that.

Possible with some configuration and a static ip or a dynamic dns service.
ok i will try to search for those configurations. thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…