kafka-testing_2.11

Kafka Unit Testing: Embeded broker, ZK, SR, Connect services

License

License

GroupId

GroupId

com.landoop
ArtifactId

ArtifactId

kafka-testing_2.11
Last Version

Last Version

2.1
Release Date

Release Date

Type

Type

jar
Description

Description

kafka-testing_2.11
Kafka Unit Testing: Embeded broker, ZK, SR, Connect services
Project URL

Project URL

https://github.com/landoop/kafka-testing
Source Code Management

Source Code Management

https://github.com/landoop/kafka-testing.git

Download kafka-testing_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.landoop/kafka-testing_2.11/ -->
<dependency>
    <groupId>com.landoop</groupId>
    <artifactId>kafka-testing_2.11</artifactId>
    <version>2.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.landoop/kafka-testing_2.11/
implementation 'com.landoop:kafka-testing_2.11:2.1'
// https://jarcasting.com/artifacts/com.landoop/kafka-testing_2.11/
implementation ("com.landoop:kafka-testing_2.11:2.1")
'com.landoop:kafka-testing_2.11:jar:2.1'
<dependency org="com.landoop" name="kafka-testing_2.11" rev="2.1">
  <artifact name="kafka-testing_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.landoop', module='kafka-testing_2.11', version='2.1')
)
libraryDependencies += "com.landoop" % "kafka-testing_2.11" % "2.1"
[com.landoop/kafka-testing_2.11 "2.1"]

Dependencies

compile (27)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.11
com.typesafe.scala-logging : scala-logging_2.11 jar 3.7.2
io.confluent » kafka-schema-registry jar 4.1.0
io.confluent » kafka-schema-registry-client jar 4.1.0
org.apache.kafka : kafka-clients jar 1.1.0
io.confluent » kafka-avro-serializer jar 4.1.0
org.apache.avro : avro jar 1.8.1
org.apache.kafka : kafka_2.11 jar 1.1.0
org.apache.kafka : kafka_2.11 jar 1.1.0
org.apache.kafka : kafka-clients jar 1.1.0
io.confluent » common-config jar 4.1.0
io.confluent » common-utils jar 4.1.0
io.confluent » rest-utils jar 4.1.0
org.apache.kafka : connect-runtime jar 1.1.0
junit : junit jar 4.12
org.bouncycastle : bcpkix-jdk15on jar 1.57
org.apache.directory.server : apacheds-core-api jar 2.0.0-M24
org.apache.directory.server : apacheds-interceptor-kerberos jar 2.0.0-M24
org.apache.directory.server : apacheds-protocol-shared jar 2.0.0-M24
org.apache.directory.server : apacheds-protocol-kerberos jar 2.0.0-M24
org.apache.directory.server : apacheds-protocol-ldap jar 2.0.0-M24
org.apache.directory.server : apacheds-ldif-partition jar 2.0.0-M24
org.apache.directory.server : apacheds-mavibot-partition jar 2.0.0-M24
org.apache.directory.server : apacheds-jdbm-partition jar 2.0.0-M24
org.apache.directory.server : apacheds-all jar 2.0.0-M24
org.apache.directory.server : apacheds-server-integ jar 2.0.0-M24
org.apache.directory.server : apacheds-core-integ jar 2.0.0-M24

test (6)

Group / Artifact Type Version
org.mockito : mockito-core jar 2.8.47
org.scalacheck : scalacheck_2.11 jar 1.13.5
org.scalatest : scalatest_2.11 jar 3.0.3
org.apache.curator : curator-test jar 3.1.0
org.powermock : powermock-module-junit4 jar 1.6.5
org.pegdown : pegdown jar 1.1.0

Project Modules

There are no modules declared in this project.

Build Status

Kafka Unit Testing

Allows you to start and stop for unit testing applications that communicate with Kafka one or more Kafka brokers + a ZooKeeper instance + a Schema Registry instance + a Kafka Connect instance

Versions

kafka-testing Kafka broker Zookeeper Schema Registry Kafka Connect
0.1 kafka_2.11 : 0.10.2.0 3.4.6 3.2.0 3.2.0
0.2 kafka_2.11 : 0.10.2.1-cp2 3.4.6 3.2.2 3.2.2
0.2 kafka_2.12 : 0.10.2.1 3.4.6 3.2.2 3.2.2
2.1 1.1 3.4.6 4.1.0 1.1.0

Maven central

<dependency>
  <groupId>com.landoop</groupId>
  <artifactId>kafka-testing_2.11</artifactId>
  <version>2.1</version>
</dependency>
compile 'com.landoop:kafka-testing_2.11:2.1
libraryDependencies += "com.landoop" %% "kafka-testing" % "2.1"

Required additional dependencies

This library requires Apache Kafka test-jars within the scope (requirement of KCluster)

libraryDependencies ++= Seq(
  "org.apache.kafka" %% "kafka" % "1.1.0" % Compile classifier "test",
  "org.apache.kafka" %% "kafka" % "1.1.0" % Compile,
  "org.apache.kafka" % "kafka-clients" % "1.1.0" % Compile classifier "test",
  "org.apache.kafka" % "kafka-clients" % "1.1.0" % Compile
)```

## Using it

```scala
 val kafkaCluster: KCluster = new KCluster()
 
 //get kafka brokers
 val brokers = kafkaCluster.BrokersList
 
 //get schema registry client
 val schemaRegistryClient = kafkaCluster.SchemaRegistryService.get.restClient
 
 
 //get schema registry endpoint
 val schemaRegistryEndpoint = kafkaCluster.SchemaRegistryService.get.Endpoint
 
 //get Zookeeper Client
 val zkClient = kafkaCluster.ZKClient
 
 //start connect
 kafkaCluster.startEmbeddedConnect(...)

License

Copyright 2017 Landoop

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
com.landoop

Lenses.io

Please visit https://github.com/lensesio for Lenses.io's repositories

Versions

Version
2.1
1.0.1
1.0
0.1