15.2. Detecting failure from the client side.

The client pings the server to prevent the server cleaning dead resources. It also pings the server to detect if the server or network has failed.
As long as the client is receiving data from the server it will consider the connection to still be alive.
If the client does not receive any packets for client-failure-check-period milliseconds then it will consider the connection failed and will either initiate fail-over, or call any SessionFailureListener instances (or ExceptionListener instances if you are using JMS) depending on how it has been configured.
For JMS, the check period is defined by the ClientFailureCheckPeriod attribute on a HornetQConnectionFactory instance. If JMS connection factory instances are being deployed directly into JNDI on the server side, it can be specified in the JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml configuration file, using the parameter client-failure-check-period.
The default value for the client failure check period is 30000ms (30 seconds). A value of -1 means the client will never fail the connection on the client side if no data is received from the server. Typically this is much lower than the connection TTL value to allow clients to reconnect in case of transitory failure.