Replicate PostgreSQL Databases Using async Python and RabbitMQ for High Availabilityby@bechir
1,827 reads

Replicate PostgreSQL Databases Using async Python and RabbitMQ for High Availability

May 5th 2022
by @bechir 1,827 reads
tldt arrow
Read on Terminal Reader🖨️

Too Long; Didn't Read

Triggers are useful for a wide range of cases, like verifying constraints or boosting performance. In our case, we will use triggers to notify our Python listener when data has been removed or added. We define a procedure called `notify_account_changes()` that will handle sending notifications about the changes in the database. We can have many listeners on a channel by executing `LISTEN channel_name. And to send notifications, we use the `NOTIFY` command or the built-in system function `pg_notify('channel_name', 'payload')

Company Mentioned

Mention Thumbnail
featured image - Replicate PostgreSQL Databases Using async Python and RabbitMQ for High Availability
bechir HackerNoon profile picture

@bechir

bechir

About @bechir
LEARN MORE ABOUT @BECHIR'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa