updated replication listeners to use existing APIs and added enabled flag.
updated exception handling.