I'm currently doing a bit of testing with alwayson and replication. I currently have the below:
- Fully working cluster and Always on environment; DCTEST1, DCTEST2 and the listener name DCTEST_L. The cluster is healthy.
- Fully working transactional replication to another server - DCREPL
- All is SQL2017 Enterprise
Replication to DCREPL works regardless of which node is the primary. I make data changes on DCTEST_L and they are successfully passed to the subscriber.
The issue I'm having is when I shut down the primary (DCTEST1). The availability group fails over successfully. However, when I make data changes on the listener - DCTEST_L; they are not replicated to DCREPL. When DCTEST1 is powered back on, then the changes are successfully replicated. Is this expected behaviour? I would like the replication to continue should the primary ever go down, and not have to stall until the node is powered back on.
Is there a step I have missed? I have followed the microsoft documentation: