That library is great but pretty dated. I put together WalEx which borrowed a good bit from Cainophole but uses the new WAL listening logic in Postgrex:
https://hexdocs.pm/postgrex/Postgrex.ReplicationConnection.h...
Here's a great talk on Postgrex Relication: