PostgreSQL to AMQP, forward PostgreSQL notifications to an AMQP queue.
1.3K
pg_notify notifications to an AMQP queue.
cargo install postgresql-to-amqp
docker run --rm -it \
-e POSTGRESQL_URI=postgresql://username:[email protected]:port/database \
-e POSTGRESQL_CHANNEL=foo \
-e AMQP_URI=amqp://127.0.0.1:5672/ \
-e AMQP_QUEUE_NAME=queueName fgribreau/postgresql-to-amqp
Configuration is done through environment variables:
postgresql://username:[email protected]:port/databasefooamqp://127.0.0.1:5672/queueNameStart the forwarder:
POSTGRESQL_URI="postgresql://username:[email protected]:port/database" POSTGRESQL_CHANNEL="foo" AMQP_URI="amqp://127.0.0.1:5672/" AMQP_QUEUE_NAME="queueName" postgresql-to-amqp
Execute in psql:
SELECT pg_notify('foo', 'payload');
The forwarder will log and forward the notification to the amqp queue:
Forwarding Notification { process_id: 31694, channel: "foo", payload: "payload" } to queue "queueName"
I will happily accept PRs for this:
version as message propertyContent type
Image
Digest
Size
501.9 MB
Last updated
about 9 years ago
docker pull fgribreau/postgresql-to-amqp