When the connection to the SonicMQ Broker fails, messages are persisted to disk, and replayed when the connection is re-established. Each connection must have a local directory specified where messages will be stored when a connection fails.
Additionally, client persistence requires using the
setClientIDprocedure. The
clientID must be unique for each client. The application may optionally call the
setPingIntervalprocedure to enable connection checking between the client and the SonicMQ Broker.
The caller must ensure that the connections to the machine and port number are correct. It is possible for messages to be lost if an incorrect broker is specified. Although the messages will be persisted to disk, they will never be sent since there will never be a broker to connect to.
For an example of client persistence, see
Client persistence.