Version info:
DB version (Source and Target): 19.11
Goldengate Version: 21.9 Microservices
OS : RHEL 8.10
In my shop, I have a pretty standard configuration whereby both the Oracle DB software and the Goldengate Microservices software are running on (installed) the same DB servers.
The GG trail files are stored in DBFS-based filesystem .
Most of the Goldengate implementations are in 2-Node RAC but some are in standalone DBs too.
The standalone DBs also use ASM (Oracle Restart SIHA).
All our DBs have Dataguard too. One of the reasons we decided to go for DBFS is for high availability whereby even when there is a switchover or failover, the DBFS-based filesystem will be available in the new primary.
My requirement:
Please have a look at the below diagram

At the source side, I have a pluggable DB named P_SALES_P hosted on Oracle DB container CDB_23P.
At the target side, I have a pluggable DB named P_SALES_REPORTING_P hosted on Oracle DB container CDB_54P.
And there is a GG replication between above-mentioned source and target.
At the source (CDB_23P/P_SALES_P), an extract and its corresponding Distribution path is running.
The Distribution path is sending the trails to the target DB CDB_54P/P_SALES_REPORTING_P.
Let us say, something went bad at target side Primary CDB_54P and which causes a Dataguard failover to its standby DB CDB_54PS.
Requirement 1.
I want an automated mechanism whereby; when there is a failover or switchover at target side, the distribution path at the source side should start sending the trails to the new primary (CDB_54PS).
Requirement 2.
And when the issues at the original primary (that was crashed) get resolved, then get 'reinstated' as the new Standby DB and when a 'Switchback' to Original primary CDB_54P, happens, the distribution path at CDB_23P should revert pointing back to the original Primary CDB_54P by the automated mechanism
Is this possible ? If so, what is best approach ?
In the old non-Microservices (classic) architecture, this was possible using the solution in the below MOS note.
But, is there an equivalent solution for Microservices ? I mean to automate the repointing of Distribution path to new primary DB (Target) after a Dataguard Failover/Switchover
Automatically change GoldenGate Data Pump RMTHOST after Goldengate target database Data Guard role transitions (Doc ID 1950121.1)