
Show HN: pg-amqp-bridge – Send Messages from PostgreSQL to RabbitMQ (rust) - steve-chavez
https://github.com/subzerocloud/pg-amqp-bridge
======
steve-chavez
This tool enables a decoupled architecture. A simple example is sending emails
when a user signs up. Instead of having explicit code in your signup function
that does the work (and slows down your response), you just have to worry
about inserting the row into the database. After this, a database trigger will
generate an event which gets sent to RabbitMQ. From there, you can have
multiple consumers reacting to that event (email, sms, log, cache). Those
consumers tend to be very short, self contained scripts.

A more complex example is if you pair pg-amqp-bridge and the Web STOMP plugin
for RabbitMQ, you can enable flexible and robust real time updates with almost
zero code for your frontend.

The larger goal is to enable the development of backends around PostgREST [1]
/ subZero [2] philosophy. Check out the PostgREST Starter Kit [3] to see how
pg-amqp-bridge fits in a larger project.

Similar work (for kafka) is bottledwater-pg [4] which has a nice blog post [5]
explaining the benefits of the architecture

[1]
[https://github.com/begriffs/postgrest](https://github.com/begriffs/postgrest)
[2] [https://subzero.cloud](https://subzero.cloud) [3]
[https://github.com/subzerocloud/postgrest-starter-
kit](https://github.com/subzerocloud/postgrest-starter-kit) [4]
[https://github.com/confluentinc/bottledwater-
pg](https://github.com/confluentinc/bottledwater-pg) [5]
[https://www.confluent.io/blog/bottled-water-real-time-
integr...](https://www.confluent.io/blog/bottled-water-real-time-integration-
of-postgresql-and-kafka/)

------
ruslan_talpa
We would apreciate some feedback on this (we are new to rust) and advice on on
how to make it more usefull/flexible

