{"repo":"ihippik/wal-listener","free":true,"listed":false,"github":"https://github.com/ihippik/wal-listener","clone":"git clone https://github.com/ihippik/wal-listener.git","description":"PostgreSQL WAL listener","language":"Go","stars":471,"topics":["golang","postgresql","logical-replication","microservices-architecture"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"WAL-Listener A service that helps implement the Event-Driven architecture . To maintain the consistency of data in the system, we will use transactional messaging - publishing events in a single transaction with a domain model change. The service allows you to subscribe to changes in the PostgreSQL database using its logical decoding capability and publish them to a message broker. Logic of work To receive events about data changes in our PostgreSQL DB we use the standard logic decoding module ( pgoutput ) This module converts changes read from the WAL into a logical replication protocol. And we already consume all this information on our side. Then we filter out only the events we need and publish them in the queue Event publishing As the message broker will be used is of your choice: - NATS JetStream [ type=nats ]; - Apache Kafka [ type=kafka ]; - RabbitMQ [ type=rabbitmq ]. - Google Pub/Sub [ type=google pubsub ]. The service publishes the following structure. The name of the topic for subscription to receive messages is formed from the prefix of the topic, the name of the database, and the name of the table prefix + schema table . If you are using Kafka, you may want to select a partition using a message key. You can do this in the producer configuration by specifying the messageKeyFrom variable, which will indicate from which table field to take the key. If there is no such field, the table name will be used. If you are using RabbitMQ, you must specify the exchangeKind c","default_branch":null,"files":null,"tree":[],"storefront":"/r/ihippik","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ihippik/wal-listener/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}