tibrvftMonitor_Create()
Function
Declaration
tibrv_statustibrvftMonitor_Create
(
tibrvftMonitor* monitor,
tibrvQueue queue,
tibrvftMonitorCallback callback,
tibrvTransport transport,
const char* groupName,
tibrv_f64 lostInterval,
void* closure);
Purpose
Monitor a fault tolerance group.
Remarks
Monitors are passive—they do not affect the group members in any way.
Rendezvous fault tolerance software queues a monitor event whenever the number of active members in the group changes—either it detects a new heartbeat, or it detects that the heartbeat from a previously active member is now silent, or it receives a message from the fault tolerance component of an active member indicating deactivation or termination.
The monitor callback function receives the number of active members as an argument.
The group need not have any members at the time of this function call.
Parameter |
Description |
|
This monitor object denotes a passive monitor of a fault tolerance group. The program supplies a location, and the function stores the new monitor object in that location. The monitor object remains valid until the program explicitly destroys it. |
|
Place events for this monitor on this event queue. |
|
On dispatch, process the event with this callback function. |
|
Listen on this transport for fault tolerance internal protocol messages (such as heartbeat messages). |
|
Monitor the fault tolerant group with this name. The group name must conform to the syntax required for Rendezvous subject names. For details, see Subject Names in . See also, Group Name. |
|
When the heartbeat signal from an active member has been silent for this interval (in seconds), Rendezvous fault tolerance software considers that member lost, and queues a monitor event. The interval must be positive. To determine the correct value, see Step 4: Choose the Intervals in .See also, Lost Interval. |
|
Store this closure data on the monitor object. |
Lost Interval
The monitor uses the lostInterval
to determine whether a member is still active. When the heartbeat signal from an active member has been silent for this interval (in seconds), the monitor considers that member lost, and queues a monitor event.
We recommend setting the lostInterval
identical to the group’s activationInterval
, so the monitor accurately reflects the behavior of the group members.
Group Name
The group name must be a legal Rendezvous subject name (see Subject Names in ). You may use names with several elements; for examples, see Multiple Groups in .