{"id":22772322,"url":"https://github.com/pactflow/example-consumer-java-kafka","last_synced_at":"2025-04-15T06:48:19.798Z","repository":{"id":42430629,"uuid":"272363145","full_name":"pactflow/example-consumer-java-kafka","owner":"pactflow","description":"Example Java Kafka Consumer","archived":false,"fork":false,"pushed_at":"2025-04-09T05:08:43.000Z","size":318,"stargazers_count":6,"open_issues_count":1,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-15T06:48:15.108Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":null,"language":"Java","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}},"created_at":"2020-06-15T06:49:12.000Z","updated_at":"2025-04-09T05:08:46.000Z","dependencies_parsed_at":"2025-04-09T06:20:05.140Z","dependency_job_id":"bf47fb85-3e3f-47a9-a567-5bf053dce8d1","html_url":"https://github.com/pactflow/example-consumer-java-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-java-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-java-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-java-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-consumer-java-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pactflow","download_url":"https://codeload.github.com/pactflow/example-consumer-java-kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023708,"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:08.459Z","updated_at":"2025-04-15T06:48:19.780Z","avatar_url":"https://github.com/pactflow.png","language":"Java","readme":"# Example Java Kafka Consumer\n\n\n![Build](https://github.com/pactflow/example-consumer-java-kafka/workflows/Build/badge.svg)\n\n[![Can I deploy Status](https://testdemo.pactflow.io/pacticipants/pactflow-example-consumer-java-kafka/branches/master/latest-version/can-i-deploy/to-environment/production/badge)](https://testdemo.pactflow.io/pacticipants/pactflow-example-consumer-java-kafka)\n\n![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-java-kafka/latest/badge) (latest pact)\n\n![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-kafka/consumer/pactflow-example-consumer-java-kafka/latest/master/badge) (master/master pact)\n\nThis is an example of a Java 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* Running the API and kafka listener locally: `make start`\n* Producing test events into the `product` topic: `make test-events`\n* Retrieve latest products: `curl localhost:8080/products`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-consumer-java-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpactflow%2Fexample-consumer-java-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-consumer-java-kafka/lists"}