{"id":21528268,"url":"https://github.com/znsio/specmatic-kafka-sample","last_synced_at":"2025-07-26T09:15:51.650Z","repository":{"id":265062472,"uuid":"811760065","full_name":"znsio/specmatic-kafka-sample","owner":"znsio","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-25T06:53:46.000Z","size":3058,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-25T07:42:46.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/znsio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-07T08:44:03.000Z","updated_at":"2025-02-24T05:38:31.000Z","dependencies_parsed_at":"2025-01-21T10:26:31.085Z","dependency_job_id":"84046cfb-1de2-4922-8d58-57bdb5763fd5","html_url":"https://github.com/znsio/specmatic-kafka-sample","commit_stats":null,"previous_names":["znsio/specmatic-kafka-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-kafka-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-kafka-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-kafka-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-kafka-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znsio","download_url":"https://codeload.github.com/znsio/specmatic-kafka-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244091772,"owners_count":20396667,"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":[],"created_at":"2024-11-24T01:52:26.084Z","updated_at":"2025-07-26T09:15:51.638Z","avatar_url":"https://github.com/znsio.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Specmatic Kafka Sample\n\n* [Specmatic Website](https://specmatic.io)\n* [Specmatic Documenation](https://specmatic.io/documentation.html)\n\nThis sample project demonstrates how we can run contract tests against a service which interacts with a kafka broker.\n\n**NOTE**: This project uses **AsyncAPI 2.6** specification. For equivalent sample project that uses **AsyncAPI 3.0** spec please refer to **[specmatic-kafka-sample-asyncapi3](https://github.com/znsio/specmatic-kafka-sample-asyncapi3)**.\n\n## Background\nThis project includes a consumer that listens to messages on a specific topic.\nUpon receiving a message, the consumer processes it and publishes a new message to two other designated topics.\n\n![Specmatic Kafka Sample Architecture](AsyncAPI-Request-Reply-Draft.gif)\n\n\n## Pre-requisites\n* Gradle\n* JDK 17+\n* Docker\n\n## Run the tests\n```shell\n./gradlew clean test\n```\n\n## Run the contract tests using specmatic-kafka docker image\n\n1. Start the kafka broker using below command.\n   ```shell\n   docker compose up\n   ```\n2. Run the application.\n   ```shell\n   ./gradlew bootRun\n   ```\n3. Run the contract tests.\n   ```shell\n   docker run --network host -v \"$PWD/specmatic.yaml:/usr/src/app/specmatic.yaml\" -v \"$PWD/src/test/resources:/usr/src/app/examples\" -v \"$PWD/build/reports:/usr/src/app/build/reports\" znsio/specmatic-kafka:0.22.13 test --examples=examples\n   ```\n\n## Get information around other CLI args exposed by specmatic-kafka docker image\n\n1. To get information around all the CLI args of the `virtualize` command, run the following.\n   ```shell\n    docker run znsio/specmatic-kafka virtualize --help\n   ```\n2. To get information around all the CLI args of the `test` command, run the following.\n   ```shell\n    docker run znsio/specmatic-kafka test --help\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-kafka-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznsio%2Fspecmatic-kafka-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-kafka-sample/lists"}