{"id":31893729,"url":"https://github.com/zehelein/pg-transactional-outbox","last_synced_at":"2025-10-13T09:21:24.486Z","repository":{"id":65551032,"uuid":"583369970","full_name":"Zehelein/pg-transactional-outbox","owner":"Zehelein","description":"A library to implement the transactional outbox pattern for PostgreSQL, a message broker or event stream, and TypeScript.","archived":false,"fork":false,"pushed_at":"2025-10-10T21:09:31.000Z","size":1442,"stargazers_count":31,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T10:56:01.553Z","etag":null,"topics":["inbox","inbox-pattern","logical-replication","microservices","nodejs","outbox","outbox-pattern","postgres","postgresql","transactional-inbox","transactional-outbox","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zehelein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-29T15:19:56.000Z","updated_at":"2025-10-10T21:09:36.000Z","dependencies_parsed_at":"2023-10-16T23:04:42.293Z","dependency_job_id":"d70fdbfd-3fbd-459f-aa1f-c31fc5f33406","html_url":"https://github.com/Zehelein/pg-transactional-outbox","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.03448275862068961,"last_synced_commit":"b035d4ace3614f96eec15b099d6eb70a2d6c2089"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Zehelein/pg-transactional-outbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zehelein%2Fpg-transactional-outbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zehelein%2Fpg-transactional-outbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zehelein%2Fpg-transactional-outbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zehelein%2Fpg-transactional-outbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zehelein","download_url":"https://codeload.github.com/Zehelein/pg-transactional-outbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zehelein%2Fpg-transactional-outbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014517,"owners_count":26085535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["inbox","inbox-pattern","logical-replication","microservices","nodejs","outbox","outbox-pattern","postgres","postgresql","transactional-inbox","transactional-outbox","typescript"],"created_at":"2025-10-13T09:21:22.831Z","updated_at":"2025-10-13T09:21:24.480Z","avatar_url":"https://github.com/Zehelein.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-transactional-outbox\n\nThe transactional outbox and transactional inbox patterns are used to ensure\nexactly-once processing of messages in event-driven architectures, where the\nloss or duplication of a message could have significant consequences. This\nlibrary guarantees that a message is sent at least once, but processed exactly\nonce, and is useful in scenarios where the reliability and atomicity of message\nprocessing is important. This pattern is an alternative to distributed\ntransactions using a two-phase commit, which can lead to bottlenecks with a\nlarge number of microservices communicating with each other.\n\n![postgresql_outbox_pattern](https://user-images.githubusercontent.com/9946441/211221740-a10d3c0b-dfa9-4c4e-84fb-068f6e63aaac.jpeg)\n_Message delivery via the PostgreSQL-based transactional outbox pattern\n(generated with Midjourney)_\n\n## Library\n\nThis `pg-transactional-outbox` library implements the mentioned transactional\noutbox and transactional inbox pattern for PostgreSQL. It stores the outgoing\nmessages reliably as part of your business logic DB transactions. It stores\nincoming messages exactly once and lets your handlers process them exactly once.\n\nThe `./lib` folder contains the `pg-transactional-outbox` library and unit\ntests. You can find an introduction to the transactional outbox and inbox\npattern in the [README.md](./lib/README.md). This should be your starting point.\n\n## Integration Tests\n\nYou can find the integration tests in the `./__tests__` folder. This folder\nincludes outbox listener and inbox listener integration tests that use a\nPostgreSQL instance for the actual tests. Check the\n[README.md](./__tests__/README.md) file for further details.\n\n## Examples\n\nThe `./examples` folder contains example implementations using actual message\nbrokers like RabbitMQ.\n\nCurrently, there is an example of how to implement the transactional outbox and\ninbox pattern when using RabbitMQ as the messaging broker. You can find more\ndetails in the [README.md](./examples/rabbitmq/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzehelein%2Fpg-transactional-outbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzehelein%2Fpg-transactional-outbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzehelein%2Fpg-transactional-outbox/lists"}