I don't know how do you want the message interchange between the two servers. Bridges are used to reliably move messages from one server to another. JMS bridges need JNDI to look up objects on both servers (source and target), so at least one of the lookup is remote. HornetQ has both JMS bridges and core bridges support. The core bridges don't use JNDI look up and can be configured using connectors with http transport.
I'd suggest you read the documentation and decide if bridges (jms or core) are what you need or not based on your requirements.
Ok, thank you for the answer!
But, is it possible to organize remote connection from client to server using only HTTP, without remote JNDI lookup? In other words - the second variant, described in my first message, without bridge?
Yes it is possible. You can achieve it with hornetq's http transport support. Have a look at the http-transport example.