Product Documentation

User-Defined Extensions for Replication

Previous Topic

Next Topic

Replication Agent State Change Event Details

Start agent

The Replication Agent is starting. The external library must provide a function named rxOnStartAgent() for the Start agent event to handle any extension library initialization that may be needed.

VOID rxOnStartAgent(prxEVENT prxagentev);

Input Parameters: rxEVENT with rxVEROP (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues startup.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Connected to source

The Replication Agent successfully connected to the source server.

VOID rxOnSourceConnected(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Connected to target

The Replication Agent successfully connected to the target server.

VOID rxOnTargetConnected(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Lost connection to source

The Replication Agent has lost its connection to the source server.

VOID rxOnSourceLostConnection(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Lost connection to target

The Replication Agent has lost its connection to the target server.

VOID rxOnTargetLostConnection(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Disconnecting from source

The Replication Agent is disconnecting from the source server.

VOID rxOnSourceDisconnected(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Disconnecting from target

The Replication Agent is disconnecting from the target server.

VOID rxOnTargetDisconnected(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Terminating agent

The Replication Agent is terminating due to an unhandled error.

VOID rxOnTerminateAgent(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Pause agent

The Replication Agent has been requested to pause its operation.

VOID rxOnPauseAgent(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent pauses its operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Resume agent

The Replication Agent has been requested to resume its operation.

VOID rxOnResumeAgent(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Stop agent

The Replication Agent is shutting down.

VOID rxOnStopAgent(prxEVENT prxagentev);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

  • RXA_DEFAULT - The Replication Agent continues normal operation.
  • RXA_SKIP - Returning this action for this event has no effect on the Replication Agent (same as RXA_DEFAULT).
  • RXA_SHUTDOWN - The Replication Agent shuts down.

Synchronous Server Shutdown

The Replication Agent is shutting down from a synchronous replication state..

VOID rxOnSyncShutdown (prxEVENT prxevent);

Input Parameters: rxEVENT (see Callback Function Input Parameters)

Output Parameters: rxEVENT action field:

The replication state as of the shutdown is passed to this function in the prxevent->ev.shutdownInfo structure; prxevent->unqid holds the agent unique ID, and state info is also in the JSON file recovery_<agentid>.json.

TOCIndex