Skip to content

znsio/specmatic-kafka-sample-asyncapi3

Repository files navigation

Specmatic Kafka Sample

This sample project demonstrates how we can run contract tests against a service which interacts with a kafka broker.

Here we are using AsyncAPI 3.0.0 specification. For equivalent AsyncAPI 2.6.0 API specification based implementation, please refer to this repository.

Background

This project includes a consumer that listens to messages on receive topic for requests and then upon receiving a message, it processes the same and publishes a reply message to send topic. Thereby it demonstrates the request reply pattern in AsyncAPI 3.0.0 specification also.

Specmatic Kafka Sample Architecture

Pre-requisites

  • Gradle
  • JDK 17+

Run the tests

./gradlew clean test

You will now see a detailed HTML report in build/reports/index.html with the messages that were sent and received as part of the contract tests.

About

Specmatic Kafka Sample AssyncAPI 3.0.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages