You need to resolve error “host not found”. This means that client machine where your Java code is running is not able to resolve network address of broker host. Use standard network diagnostic tools (ping, lookup, traceroute etc) to find why Broker host is not visible on Java application host.
Since you say the same connection factory on IS work, so I suspect one of following:
- Broker host and IS host are running in same network. But, Java application host is in different network.
- Broker host machine has some firewall rules. IS is running on same host, so those rules do not apply on IS. But, Java application running on different host is denied any access by firewall.
- You are using AWS kind of infra that has internal/external IP/hostname. Both, Broker and IS are hosted in same infra, so connection factory using internal IP/hostname is able to resolve network address. But, Java application is running outside that infra, so internal IP/address no longer work. In this case, you’ll need to rebuild your connection factory using external IP/hostname.