Get replication agent id in Replication EventHandler
Hello All,
I am implementing a replication event handler and one of the requirements is to get the replication agent id for each of the activate processes.
This is snippet of what I have written in the handleEvent method
ReplicationAction replicationAction = ReplicationAction.fromEvent(event);
if (null != replicationAction) {
String path = replicationAction.getPath();
String type = replicationAction.getType() != null ? replicationAction.getType().toString() : "";
LOG.info("Replication triggered {} for {} ", type, path);
String strReplicationAgentId = replicationAction.getConfig() != null ? replicationAction.getConfig().getAgentId() : "";
LOG.info("ReplicationAgentId: {}", strReplicationAgentId);
}
The issue is that the strReplicationAgentIdis always null.
I know that this is based on the runmodes, but not sure how to get the agent ids involved in the replication event.
Any guidance on how to achieve this will be very helpful.