Confused about terminology

Hi,

I have installed OpenFire… I am very new to XMPP, but been developing for 25 years…

What Im wanting is message server to allow me to send messages from IOT devices to each other… I.E. , Sending commands, getting sensor data etc…

I would like groups of users/devices to be able to send messages ONLY to other members of their group… For instance, imagine having 5 different smart home installations… We want the devices to be able to communicate with ONLY those devices in that home…

Anyway, I plan on hosting my server on my windows box in the cloud… I use a domain like Myserver.MyDomain.com to get to it…

Im confused by the term “Domain” in the OpenFire sense… Does it mean the same as a DNS type domain?? or is it just a way to segregate users by areas?

Im not really sure why a TCPIP server would ever care what DNS domain the traffic came from… Im thinking it mean something different in this context?

I read something that the only way to connect is by using a FQDN… Cant I simply use an Ip address and not even have a domain? I.E. inside a Lan ??

I cant find much on this… Sorry for being so lame…

Gordon