The main advantage of this design is that it is lightweight, since it uses RMI and does not directly use JMS. The only JMS connection is used to send the RMI messages to the server and to return the results. This is done in order to create the RMI service in a separate location from the HornetQ server. In addition, the RMI client does not need to be updated to accommodate new JMS features in future versions of HornetQ. This makes using a RMI service easy and simple to implement.
The hornetq library has an embedded RMI client to allow one to easily create distributed HornetQ applications. An external RMI service is used to communicate with the HornetQ Server. This service is located on a different machine than the HornetQ Server and can be hosted separately. This service can be accessed by other applications and even other JVMs from the same machine. This design allows the use of existing RMI clients if one wants to use them, and it also allows one to easily create new RMI clients for using the HornetQ services.