Crates.io | postgresql-to-amqp |
lib.rs | postgresql-to-amqp |
version | 0.1.4-pre |
source | src |
created_at | 2017-04-04 22:33:46.189569 |
updated_at | 2017-07-23 22:05:13.941095 |
description | PostgreSQL to AMQP, forward PostgreSQL notifications to an AMQP queue. |
homepage | https://github.com/FGRibreau/postgresql-to-amqp |
repository | https://github.com/FGRibreau/postgresql-to-amqp |
max_upload_size | |
id | 9643 |
size | 7,013 |
pg_notify
notifications to an AMQP queue.cargo install postgresql-to-amqp
docker run --rm -it \
-e POSTGRESQL_URI=postgresql://username:password@domain.tld: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:password@domain.tld:port/database
foo
amqp://127.0.0.1:5672/
queueName
Start the forwarder:
POSTGRESQL_URI="postgresql://username:password@domain.tld: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"
Low memory consumption (1,9Mo)
Single binary
No dependency
Predictable performance
I will happily accept PRs for this:
version
as message property