% CREATE EXTENSION amqp; CREATE EXTENSION % SELECT amqp.publish(broker_id, 'amqp.direct', 'foo', 'message');
The pg_amqp package provides the ability for postgres statements to directly publish messages to an AMQP broker.
Insert AMQP broker information (host/port/user/pass) into the
A process starts and connects to PostgreSQL and runs:
SELECT amqp.publish(broker_id, 'amqp.direct', 'foo', 'message');
Upon process termination, all broker connections will be torn down. If there is a need to disconnect from a specific broker, one can call:
which will disconnect from the broker if it is connected and do nothing if it is already disconnected.