{"id":22772309,"url":"https://github.com/pactflow/example-consumer-js-kafka","last_synced_at":"2025-04-15T06:48:15.572Z","repository":{"id":42262490,"uuid":"271203995","full_name":"pactflow/example-consumer-js-kafka","owner":"pactflow","description":"Example NodeJS Kafka Consumer","archived":false,"fork":false,"pushed_at":"2025-04-14T20:22:19.000Z","size":857,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-15T06:48:11.288Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pactflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-10T07:05:05.000Z","updated_at":"2025-04-14T20:22:22.000Z","dependencies_parsed_at":"2024-11-07T16:31:32.425Z","dependency_job_id":"b8b2201d-5fb1-4c5d-b3c9-9e5105147ec5","html_url":"https://github.com/pactflow/example-consumer-js-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-js-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-js-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-js-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-js-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pactflow","download_url":"https://codeload.github.com/pactflow/example-consumer-js-kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023707,"owners_count":21199958,"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","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":["example"],"created_at":"2024-12-11T17:08:03.289Z","updated_at":"2025-04-15T06:48:15.553Z","avatar_url":"https://github.com/pactflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Node Kafka Consumer\n\n![Build](https://github.com/pactflow/example-consumer-js-kafka/workflows/Build/badge.svg)\n\n[![Can I deploy Status](https://testdemo.pactflow.io/pacticipants/pactflow-example-consumer-js-kafka/branches/master/latest-version/can-i-deploy/to-environment/production/badge)](https://testdemo.pactflow.io/overview/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-js-kafka)\n\n[![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-js-kafka/latest/badge)](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-js-kafka/latest) (latest pact)\n\n[![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-js-kafka/latest/master/badge.svg)](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-js-kafka/latest/master) (master/master pact)\n\nThis is an example of a Node kafka consumer that uses Pact, [PactFlow](https://pactflow.io) and GitHub Actions to ensure that it is compatible with the expectations its consumers have of it.\n\nThe project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.\n\nSee the canonical consumer example here: https://github.com/pactflow/example-consumer\nSee also the full [PactFlow CI/CD Workshop](https://docs.pactflow.io/docs/workshops/ci-cd) for which this can be substituted in as the \"consumer\".\n\nIn the following diagram, we'll be testing the \"Product API\", a simple HTTP service that exposes product information as a REST API, which is fed events from an Event API on the `product` topic.\n\n![Kafka Architecture](docs/kafka.png \"Kafka Architecture\")\n\n## Pre-requisites\n\n**Software**:\n\nhttps://docs.pactflow.io/docs/workshops/ci-cd/set-up-ci/prerequisites/\n\n## Usage\n\n* Install the project: `make install`\n  * `npm install`\n* Running the API locally: `make start`\n  * `docker-compose -f kafka-cluster.yml up -d --no-recreate`\n  * `npm run start`\n* Producing test events into the `product` topic: `make test-events`\n  * `npm run test:events`\n* Retrieve latest products: `curl localhost:8080/products`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-consumer-js-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpactflow%2Fexample-consumer-js-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-consumer-js-kafka/lists"}