Administrative Messages

Administrative messages contain the command (or action) to be performed in the content of the message. It is a string in upper-case letters.

The following messages are used to control the master of the replication. The master of a Database replication is normally a DbWatcher (either standalone or as a plugin) but the user is free to implement its own module (plugin or application) which will respond to such messages with the adequate actions.

REQUEST_UPDATE

This message is sent by a ReplSlave as a PtP to the session of the associated master to tell him to start a new initial update. The ReplSlave knows the session of the master since it knows his complete configuration. This message is published on the topic replRequestInitialData. The message is persistent and will be queued if the master is not available.

Table 5.2. Message Attributes for REQUEST_UPDATE administrative messages

Attribute NameTypeDefaultComment
_slaveNameStringnull Mandatory. It contains the sessionId of the slave which shall receive the data for this initial update.
_replVersionStringnull Mandatory. It contains the version of the source of the replication to be used for this slave.
_initialFilesLocationStringnull Optional. Tells where to store the initial files in case the replication data has to be transfered manually by means of copying files.
_initialUpdateOnlyRegisterbooleanfalse Optional. If true, the message will inform the master not to start with the initial update right the way. Instead it will accumulate this request with others and wait until a INITIAL_UPDATE_START_BATCH message arrives. Only then it will initiate the update.


REPL_REQUEST_CANCEL_UPDATE

This message is sent by a ReplSlave as a PtP to the session of the associated master to tell him to cancel the previously triggered initial update. The ReplSlave knows the session of the master since it knows his complete configuration. This message is published on the topic replRequestCancelUpdate. The message is persistent and will be queued if the master is not available.

Table 5.3. Message Attributes for REPL_REQUEST_CANCEL_UPDATE administrative messages

Attribute NameTypeDefaultComment
_slaveNameStringnull Mandatory. It contains the sessionId of the slave which shall receive the data for this initial update.


REPL_REQUEST_RECREATE_TRIGGERS

This message is sent by the ReplManagerPlugin as a PtP to the session of the master to tell him to recreate the triggers used to detect changes on the source database. This message is published on an anonymous topic. The message is transient and will be queued if the master is not available. No attributes are used for this command message. This is normally a request triggered on the JMX Console. No confirmation messages are sent back to the publisher of this message.

STATEMENT

This message is sent by the ReplManagerPlugin as a PtP to the session of the master to tell him to execute a Statement (an SQL Statement) on the master and all the associated slaves. The statement can either be a read- or write statement (select or update). This message is published on the topic replRequestBroadcastSQL, is persistent and will be queued if the master is not available. A response of the result of the operation on the master is published on the topic specified in this request via a Data Message with command STATEMENT. Also is replicated to all associated slaves using the replication mechanism of the master (normally via its REPL_ITEMS Table. The message can be published as a high prio message (priority 8).

Table 5.4. Message Attributes for STATEMENT administrative messages

Attribute NameTypeDefaultComment
statementStringnull Mandatory. It contains the SQL Statement to be executed.
statementPriobooleanfalse Optional. If it set to true the priority of the responses will be set to be high (8).
statementIdStringnull Mandatory. This is the ID which identifies this request. It is used to find the response to the request.
sqlTopicStringnull Mandatory. This is the name of the topic to be used for the responses of the select statement.
maxEntriesIntegernull Optional. This is the maximum number of results to be sent back as the result of the statement. If nothing is specified, the complete result is returned.


INITIAL_UPDATE_START_BATCH

This message is sent by the ReplManagerPlugin as a PtP to the session of the master to tell him to start collect initial update commands. This message is published on the topic replSimpleMessage, is transient and will be queued if the master is not available. It contains no attributes.

INITIAL_UPDATE_COLLECT

This message is sent by the ReplManagerPlugin as a PtP to the session of the master to tell him to start the initial update for the collected requests (all INITIAL_UPDATE requests collected after the last INITIAL_UPDATE_START_BATCH). This message is published on the topic replSimpleMessage, is transient and will be queued if the master is not available. It contains no attributes.