Red Hat Training

A Red Hat training course is available for Red Hat JBoss Operations Network

7.19. Configuring Agent Communication

Both the JBoss ON agent and server use the same underlying communications services. The types of connections used for agent-server communication are defined through agent preferences and can be edited by changing those preferences. The agent uses two settings for communications:
  • A parameter which defines the protocol that the agent uses to talk to the server (rhq.agent.server.transport) and any additional transport parameters (rhq.agent.server.transport-params)
  • A parameter which defines the protocol that the agent expects for incoming communications from the server (rhq.communications.connector.transport) and then any optional transport parameters (rhq.communications.connector.transport-params)
Both JBoss ON servers and agents use communications layers that are build on the JBoss Remoting framework. Agents support four different transport types:
  • servlet (only for agent to server communications)
  • sslservlet
  • socket (only for server to agent communications)
  • sslsocket

Note

Unlike JBoss ON servers, JBoss ON agents do not host a servlet container. This means that servlets cannot be used for server-to-agent communications; these connections use sockets. Only agent-to-server connections use servlets.
The behavior of connections between agents and servers can be controlled by setting transport parameters. The connections between agents and servers are defined by strings which look, roughly, like URLs, with this basic format:
protocol://hostname:port/?param1=value&param2=value
For example:
socket://server.example.com:16163/?serverBindAddress=127.0.0.1&serverBindPort=16163&numAcceptThreads=3&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200
Both servers and agents have a rhq.communications.connector.transport-params configuration settings which allows transport parameters to be set. These parameters are appended to the end of the URL and can configure both server-side and client-side behavior. For example, the backlog parameter is used by JBoss ON servers; with this URL, the server sets its backlog value to 200, but this setting is ignored by agents since they are clients. Likewise, the enableTcpNoDelay parameter is used by agents when they connect to servers, but is ignored by the servers themselves.
For more information on all available transport parameters, see the JBoss Remoting documentation at http://docs.jboss.org/jbossremoting/2.5.4.SP4/guide/html/chapter-configuration.html.