{"id":13651186,"url":"https://github.com/Tinkoff/gatling-kafka-plugin","last_synced_at":"2025-04-22T22:30:36.992Z","repository":{"id":40206808,"uuid":"192928376","full_name":"Tinkoff/gatling-kafka-plugin","owner":"Tinkoff","description":"Plugin for support Kafka in Gatling","archived":true,"fork":false,"pushed_at":"2023-08-07T22:01:30.000Z","size":149,"stargazers_count":60,"open_issues_count":19,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-01-26T05:13:33.911Z","etag":null,"topics":["gatling","kafka","performance"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tinkoff.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}},"created_at":"2019-06-20T13:49:34.000Z","updated_at":"2023-11-08T09:24:48.000Z","dependencies_parsed_at":"2024-01-03T05:41:14.270Z","dependency_job_id":"c0cb32b3-275f-4af7-920a-653477897cb3","html_url":"https://github.com/Tinkoff/gatling-kafka-plugin","commit_stats":null,"previous_names":["tinkoffcreditsystems/gatling-kafka-plugin"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fgatling-kafka-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fgatling-kafka-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fgatling-kafka-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinkoff%2Fgatling-kafka-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tinkoff","download_url":"https://codeload.github.com/Tinkoff/gatling-kafka-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250333863,"owners_count":21413471,"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":["gatling","kafka","performance"],"created_at":"2024-08-02T02:00:46.185Z","updated_at":"2025-04-22T22:30:36.724Z","avatar_url":"https://github.com/Tinkoff.png","language":"Scala","funding_links":[],"categories":["Tools"],"sub_categories":["Plugins"],"readme":"# Gatling Kafka Plugin\n\n![Build](https://github.com/TinkoffCreditSystems/gatling-kafka-plugin/workflows/Build/badge.svg) [![Maven Central](https://img.shields.io/maven-central/v/ru.tinkoff/gatling-kafka-plugin_2.13.svg?color=success)](https://search.maven.org/search?q=ru.tinkoff.gatling-kafka)  [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n[![codecov.io](https://codecov.io/github/Tinkoff/gatling-kafka-plugin/coverage.svg?branch=master)](https://codecov.io/github/Tinkoff/gatling-kafka-plugin?branch=master)\n\n# Introduction\n\nPlugin to support Kafka in Gatling (3.9.x)\n\n# Usage\n\n### Getting Started\n\nPlugin is currently available for Scala 2.13, Java 17, Kotlin.\n\nYou may include plugin as dependency in project with your tests. Write\n\n### Scala\n\n```scala\nlibraryDependencies += \"ru.tinkoff\" %% \"gatling-kafka-plugin\" % \u003cversion\u003e % Test\n```\n\n### Java\n\nWrite this to your dependencies block in build.gradle:\n\n```java\ngatling \"ru.tinkoff:gatling-kafka-plugin_2.13:\u003cversion\u003e\"\n```\n\n### Kotlin\n\nWrite this to your dependencies block in build.gradle:\n\n```kotlin\ngatling(\"ru.tinkoff:gatling-kafka-plugin_2.13:\u003cversion\u003e\")\n```\n\n## Example Scenarios\n\n### Scala\n\nExamples [here](src/test/scala/ru/tinkoff/gatling/kafka/examples)\n\n### Java\n\nExamples [here](src/test/java/ru/tinkoff/gatling/kafka/javaapi/examples)\n\n### Kotlin\n\nExamples [here](src/test/kotlin/ru/tinkoff/gatling/kafka/javaapi/examples)\n\n## Download and create Avro schema\n\nAvro schema is downloaded using the plugin [sbt-schema-registry-plugin](https://github.com/Tinkoff/sbt-schema-registry-plugin)\nand for that you need to configure schemas and url in `build.sbt` and run the command:\n\n```bash \nsbt schemaRegistryDownload\n```\n\nTo create java classes you should add use capabilities, that provide plugin [sbt-avro](https://github.com/sbt/sbt-avro).\nThis plugin is included in project and will do all needed for creating java classes in compile stage.\nTo run you should create scala object in root project directory and type `sbt run`.\n\n### Example download avro-schema\n\nExample [here](https://github.com/TinkoffCreditSystems/gatling-kafka-plugin/tree/master/src/test/scala/ru/tinkoff/gatling/kafka/examples)\n\n## Avro support in Request-Reply\n\n### Scala\n\nTo use avro messages as payload in key or value, you must:\n\n- define implicit for schema registry url:\n\n```scala\nimplicit val schemaRegUrl: String = \"http://localhost:9094\"\n```\n\n- or define serde for your class:\n\n```scala\nval ser =\n  new KafkaAvroSerializer(\n    new CachedSchemaRegistryClient(\"schRegUrl\".split(',').toList.asJava, 16),\n  )\n\nval de =\n  new KafkaAvroDeserializer(\n    new CachedSchemaRegistryClient(\"schRegUrl\".split(',').toList.asJava, 16),\n  )\n\nimplicit val serdeClass: Serde[MyAvroClass] = new Serde[MyAvroClass] {\n  override def serializer(): Serializer[MyAvroClass] = ser.asInstanceOf[Serializer[MyAvroClass]]\n  override def deserializer(): Deserializer[MyAvroClass] = de.asInstanceOf[Deserializer[MyAvroClass]]\n}\n```\n\n### Java\n\nTo use avro messages as payload in key or value, you must define serde for your class:\n\n```java\npublic static Serializer\u003cMyAvroClass\u003e ser = (Serializer) new KafkaAvroSerializer(new CachedSchemaRegistryClient(Arrays.asList(\"schRegUrl\".split(\",\")), 16));\npublic static Deserializer\u003cMyAvroClass\u003e de = (Deserializer) new KafkaAvroDeserializer(new CachedSchemaRegistryClient(Arrays.asList(\"schRegUrl\".split(\",\")), 16));\n```\n\n### Kotlin\n\nTo use avro messages as payload in key or value, you must define serde for your class:\n\n```kotlin\nval ser = KafkaAvroSerializer(CachedSchemaRegistryClient(\"schRegUrl\".split(','), 16),) as Serializer\u003cMyAvroClass\u003e\nval de = KafkaAvroDeserializer(CachedSchemaRegistryClient(\"schRegUrl\".split(','), 16),) as Deserializer\u003cMyAvroClass\u003e\n```\n\n### Example usage Avro in Request-Reply\n\nExample [scala](src/test/scala/ru/tinkoff/gatling/kafka/examples/AvroClassWithRequestReplySimulation.scala)\n\nExample [java](src/test/java/ru/tinkoff/gatling/kafka/javaapi/examples/AvroClassWithRequestReplySimulation.java)\n\nExample [kotlin](src/test/kotlin/ru/tinkoff/gatling/kafka/javaapi/examples/AvroClassWithRequestReplySimulation.kt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTinkoff%2Fgatling-kafka-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTinkoff%2Fgatling-kafka-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTinkoff%2Fgatling-kafka-plugin/lists"}