diff --git a/.github/scripts/create-web-site.sh b/.github/scripts/create-web-site.sh new file mode 100755 index 00000000..aa8aa6f9 --- /dev/null +++ b/.github/scripts/create-web-site.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +echo "GIT_DEPLOY_KEY: $GIT_DEPLOY_KEY" + +sbt docs/docusaurusPublishGhpages \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..8e6d391b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +name: build + +on: [push, pull_request] + +jobs: + + tests: + name: scala-${{ matrix.scala }} jdk-${{ matrix.java }} tests + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + java: [8] + scala: [2.11.12, 2.12.10] + + steps: + - uses: actions/checkout@v2 + - uses: olafurpg/setup-scala@v7 + with: + java-version: "adopt@1.${{ matrix.java }}" + + - name: Cache SBT Coursier directory + uses: actions/cache@v1 + with: + path: ~/.cache/coursier/v1 + key: ${{ runner.os }}-coursier-${{ hashFiles('**/*.sbt') }} + restore-keys: | + ${{ runner.os }}-coursier- + - name: Cache SBT directory + uses: actions/cache@v1 + with: + path: ~/.sbt + key: | + ${{ runner.os }}-sbt-${{ hashFiles('project/build.properties') }}-${{ hashFiles('project/plugins.sbt') }} + restore-keys: ${{ runner.os }}-sbt- + + - name: Run Tests for Java ${{ matrix.java }}, Scala ${{ matrix.scala }} + run: sbt ci + + publish: + name: Publish + needs: [ tests ] + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: olafurpg/setup-scala@v2 + - uses: olafurpg/setup-gpg@v2 + - name: Publish release ${{ github.ref }} + run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + - name: Publis documentation web page + run: | + ./.github/scripts/create-web-site.sh + env: + GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} + diff --git a/.gitignore b/.gitignore index 1310ac33..d2272ac7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,11 @@ project/plugins/project/ .scala_dependencies .worksheet .idea + +#website +/website/blog/ +/website/build/ +/website/node_modules/ +/website/static/api/ +/website/variables.js +/website/yarn.lock \ No newline at end of file diff --git a/AUTHORS b/AUTHORS index 2a6df353..00b7adbe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,3 +21,6 @@ https://github.com/poslegm Vasiliy Efimov https://github.com/voidconductor + +Pau Alarcón +https://github.com/paualarco \ No newline at end of file diff --git a/README.md b/README.md index 28ff1acc..55ea2621 100644 --- a/README.md +++ b/README.md @@ -1,260 +1,13 @@ -# Monix-Kafka +# Monix Kafka + + [![Build Status](https://travis-ci.org/monix/monix-kafka.svg?branch=master)](https://travis-ci.org/monix/monix-kafka) [![Maven Central](https://img.shields.io/maven-central/v/io.monix/monix-kafka-1x_2.12.svg)](https://search.maven.org/search?q=g:io.monix%20AND%20a:monix-kafka-1x_2.12) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-brightgreen.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org) - [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -Monix integration with Kafka - -Work in progress! - -## Table of Contents -1. [Getting Started with Kafka 1.0.x or above](#getting-started-with-kafka-10x-or-above) -2. [Getting Started with Kafka 0.11.x](#getting-started-with-kafka-011x) -3. [Getting Started with Kafka 0.10.x](#getting-started-with-kafka-010x) -4. [Getting Started with Kafka 0.9.x](#getting-started-with-kafka-09x) -5. [Getting Started with Kafka 0.8.x (no longer supported)](#getting-started-with-kafka-08x) -6. [Usage](#usage) -7. [How can I contribute to Monix-Kafka?](#how-can-i-contribute-to-monix-kafka?) -8. [Maintainers](#maintainers) -9. [License](#license) - -## Getting Started with Kafka 1.0.x or above - -In SBT: - -```scala -libraryDependencies += "io.monix" %% "monix-kafka-1x" % "1.0.0-RC5" -``` - -For `kafka` versions higher than `1.0.x` also add a dependency override: - -```scala -dependencyOverrides += "org.apache.kafka" % "kafka" % "2.1.0" -``` - -Or in case you're interested in running the tests of this project, it -now supports embedded kafka for integration testing. You can simply run: - -```bash -sbt kafka1x/test -``` - -## Getting Started with Kafka 0.11.x - -In SBT: - -```scala -libraryDependencies += "io.monix" %% "monix-kafka-11" % "1.0.0-RC5" -``` - -Or in case you're interested in running the tests of this project, it -now supports embedded kafka for integration testing. You can simply run: - -```bash -sbt kafka11/test -``` - -## Getting Started with Kafka 0.10.x - -In SBT: - -```scala -libraryDependencies += "io.monix" %% "monix-kafka-10" % "1.0.0-RC5" -``` - -Or in case you're interested in running the tests of this project, it -now supports embedded kafka for integration testing. You can simply run: - -```bash -sbt kafka10/test -``` - -## Getting Started with Kafka 0.9.x - -Please note that `EmbeddedKafka` is not supported for Kafka `0.9.x` - -In SBT: - -```scala -libraryDependencies += "io.monix" %% "monix-kafka-9" % "1.0.0-RC5" -``` - -Or in case you're interested in running the tests of this project, -first download the Kafka server, version `0.9.x` from their -[download page](https://kafka.apache.org/downloads.html) (note that -`0.10.x` or higher do not work with `0.9`), then as the -[quick start](https://kafka.apache.org/090/documentation.html#quickstart) -section says, open a terminal window and first start Zookeeper: - -```bash -bin/zookeeper-server-start.sh config/zookeeper.properties -``` - -Then start Kafka: - -```bash -bin/kafka-server-start.sh config/server.properties -``` - -Create the topic we need for our tests: - -```bash -bin/kafka-topics.sh --create --zookeeper localhost:2181 \ - --replication-factor 1 --partitions 1 \ - --topic monix-kafka-tests -``` - -And run the tests: - -```bash -sbt kafka9/test -``` - -## Getting Started with Kafka 0.8.x - -Please note that support for Kafka `0.8.x` is dropped and the last available version with this dependency is `0.14`. - -In SBT: - -```scala -libraryDependencies += "io.monix" %% "monix-kafka-8" % "0.14" -``` - -Or in case you're interested in running the tests of this project, -first download the Kafka server, version `0.8.x` from their -[download page](https://kafka.apache.org/downloads.html) (note that -`0.9.x` or higher do not work with `0.8`), then as the -[quick start](https://kafka.apache.org/082/documentation.html#quickstart) -section says, open a terminal window and first start Zookeeper: - -```bash -bin/zookeeper-server-start.sh config/zookeeper.properties -``` - -Then start Kafka: - -```bash -bin/kafka-server-start.sh config/server.properties -``` - -Create the topics we need for our tests: - -```bash -bin/kafka-topics.sh --create --zookeeper localhost:2181 \ - --replication-factor 1 --partitions 1 \ - --topic monix-kafka-tests -bin/kafka-topics.sh --create --zookeeper localhost:2181 \ - --replication-factor 1 --partitions 1 \ - --topic monix-kafka-manual-commit-tests -``` - -And run the tests: - -```bash -sbt kafka8/test -``` - -## Usage - -### Producer - -```scala -import monix.kafka._ -import monix.execution.Scheduler - -implicit val scheduler: Scheduler = monix.execution.Scheduler.global - -// Init -val producerCfg = KafkaProducerConfig.default.copy( - bootstrapServers = List("127.0.0.1:9092") -) - -val producer = KafkaProducer[String,String](producerCfg, scheduler) - -// For sending one message -val recordMetadataF = producer.send("my-topic", "my-message").runToFuture - -// For closing the producer connection -val closeF = producer.close().runToFuture -``` - -Calling `producer.send` returns a [Task](https://monix.io/docs/3x/eval/task.html) of `Option[RecordMetadata]` which can then be run and transformed into a `Future`. - -If the `Task` completes with `None` it means that `producer.send` method was called after the producer was closed and that the message wasn't successfully acknowledged by the Kafka broker. In case of the failure of the underlying Kafka client the producer will bubble up the exception and fail the `Task`. All successfully delivered messages will complete with `Some[RecordMetadata]`. - -For pushing an entire `Observable` to Apache Kafka: - -```scala -import monix.kafka._ -import monix.execution.Scheduler -import monix.reactive.Observable -import org.apache.kafka.clients.producer.ProducerRecord - -implicit val scheduler: Scheduler = monix.execution.Scheduler.global - -// Initializing the producer -val producerCfg = KafkaProducerConfig.default.copy( - bootstrapServers = List("127.0.0.1:9092") -) - -val producer = KafkaProducerSink[String,String](producerCfg, scheduler) - -// Lets pretend we have this observable of records -val observable: Observable[ProducerRecord[String,String]] = ??? - -observable - // on overflow, start dropping incoming events - .whileBusyDrop - // buffers into batches if the consumer is busy, up to a max size - .bufferIntrospective(1024) - // consume everything by pushing into Apache Kafka - .consumeWith(producer) - // ready, set, go! - .runToFuture -``` - -### Consumer - -There are several ways for consuming from Apache Kafka (Version 0.11.x and above): - -Consumer which commits offsets itself: -```scala -import monix.kafka._ - -val consumerCfg = KafkaConsumerConfig.default.copy( - bootstrapServers = List("127.0.0.1:9092"), - groupId = "kafka-tests" - // you can use this settings for At Most Once semantics: - // observableCommitOrder = ObservableCommitOrder.BeforeAck -) - -val observable = - KafkaConsumerObservable[String,String](consumerCfg, List("my-topic")) - .take(10000) - .map(_.value()) -``` - -Consumer which allows you to commit offsets manually: -```scala -import monix.kafka._ - -val consumerCfg = KafkaConsumerConfig.default.copy( - bootstrapServers = List("127.0.0.1:9092"), - groupId = "kafka-tests" -) - -val observable = - KafkaConsumerObservable.manualCommit[String,String](consumerCfg, List("my-topic")) - .map(message => message.record.value() -> message.committableOffset) - .mapEval { case (value, offset) => performBusinessLogic(value).map(_ => offset) } - .bufferTimedAndCounted(1.second, 1000) - .mapEval(offsets => CommittableOffsetBatch(offsets).commitSync()) -``` - -Enjoy! +See the [__documentation web site__](https://monix.github.io/monix-kafka) to get started. ### Caveats diff --git a/build.sbt b/build.sbt index df7a2ab6..b9076c9f 100644 --- a/build.sbt +++ b/build.sbt @@ -136,7 +136,7 @@ lazy val sharedSettings = warnUnusedImport ++ Seq( licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), homepage := Some(url("https://github.com/monix/monix-kafka")), headerLicense := Some(HeaderLicense.Custom( - """|Copyright (c) 2014-2019 by The Monix Project Developers. + """|Copyright (c) 2014-2020 by The Monix Project Developers. | |Licensed under the Apache License, Version 2.0 (the "License"); |you may not use this file except in compliance with the License. @@ -283,4 +283,90 @@ git.formattedShaVersion := { git.gitHeadCommit.value map { _.substring(0, 7) } map { sha => git.baseVersion.value + "-" + sha + suffix } +} + +lazy val docs = project + .in(file("monix-kafka-docs")) + .settings( + moduleName := "monix-kafka-docs", + name := moduleName.value, + sharedSettings, + skipOnPublishSettings, + mdocSettings + ) + .enablePlugins(DocusaurusPlugin, MdocPlugin, ScalaUnidocPlugin) + +lazy val docsMappingsAPIDir = + settingKey[String]("Name of subdirectory in site target directory for api docs") + +lazy val skipOnPublishSettings = Seq( + skip in publish := true, + publish := (()), + publishLocal := (()), + publishArtifact := false, + publishTo := None +) + +lazy val mdocSettings = Seq( + scalacOptions --= Seq("-Xfatal-warnings", "-Ywarn-unused"), + crossScalaVersions := Seq(scalaVersion.value), + unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(monixKafka), + target in (ScalaUnidoc, unidoc) := (baseDirectory in LocalRootProject).value / "website" / "p" / "api", + cleanFiles += (target in (ScalaUnidoc, unidoc)).value, + docusaurusCreateSite := docusaurusCreateSite + .dependsOn(unidoc in Compile) + .dependsOn(updateSiteVariables in ThisBuild) + .value, + docusaurusPublishGhpages := + docusaurusPublishGhpages + .dependsOn(unidoc in Compile) + .dependsOn(updateSiteVariables in ThisBuild) + .value, + scalacOptions in (ScalaUnidoc, unidoc) ++= Seq( + "-doc-source-url", s"https://github.com/monix/monix-kafka/tree/v${version.value}€{FILE_PATH}.scala", + "-sourcepath", baseDirectory.in(LocalRootProject).value.getAbsolutePath, + "-doc-title", "Monix Kafka", + "-doc-version", s"v${version.value}", + "-groups" + ), + // Exclude monix.*.internal from ScalaDoc + sources in (ScalaUnidoc, unidoc) ~= (_ filterNot { file => + // Exclude all internal Java files from documentation + file.getCanonicalPath matches "^.*monix.+?internal.*?\\.java$" + }), +) + +def minorVersion(version: String): String = { + val (major, minor) = + CrossVersion.partialVersion(version).get + s"$major.$minor" +} + +val updateSiteVariables = taskKey[Unit]("Update site variables") +updateSiteVariables in ThisBuild := { + val file = + (baseDirectory in LocalRootProject).value / "website" / "variables.js" + + val variables = + Map[String, String]( + "organization" -> (organization in LocalRootProject).value, + "coreModuleName" -> (moduleName in monixKafka).value, + "latestVersion" -> version.value, + "scalaPublishVersions" -> { + val minorVersions = (crossScalaVersions in monixKafka).value.map(minorVersion) + if (minorVersions.size <= 2) minorVersions.mkString(" and ") + else minorVersions.init.mkString(", ") ++ " and " ++ minorVersions.last + } + ) + + val fileHeader = + "// Generated by sbt. Do not edit directly." + + val fileContents = + variables.toList + .sortBy { case (key, _) => key } + .map { case (key, value) => s" $key: '$value'" } + .mkString(s"$fileHeader\nmodule.exports = {\n", ",\n", "\n};\n") + + IO.write(file, fileContents) } \ No newline at end of file diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 00000000..a837f1f3 --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,65 @@ +--- +id: configuration +title: Configuration +--- + +### Introduction + +_Apache Kafka_ does provide a wide range of parameters to be configured, it allows to cover the most specific business cases and also highly recommendable to fine tune them for reaching out the best +possible performance. + +_Monix Kafka_ provides file driven configuration to the application, which makes it very intuitive to define and set up all these kafka default parametrization from the [default.conf](https://github.com/monix/monix-kafka/blob/master/kafka-1.0.x/src/main/resources/monix/kafka/default.conf) file. + +Indeed, any file with format `.conf` that is in `resources` folder of your project will be used as a default one and from there on you can overwrite using environment variables or directly from the code. + +Let's see how to do so in the following section. + +### Getting started with the configuration + +As mentioned before, you can specify configuration parameters as a `HOCON` file identified with `.conf`. +An awesome file format that supports many features different use cases, with support for java format, substitutions, comments, properties-like notation and more importantly it allows substitution from environment variables and from your code. +For more info on how to use it see refer to the [typesafe config documentation](https://github.com/lightbend/config). + +As a quick go through, let's highlight some of the most important configuration fields: + +The first and more important one is the specification of the kafka brokers, being as default `localhost:9092` would probably don't need to be modified to work locally but you would definetly +have to update it with the required bootstrap servers of your kafka cluster: + +```hocon +kafka { + bootstrap.servers = ["localhost:9092", "localhost:9093"] + client.id = "" + ... +} +``` + +You could for example overwrite the client id from an _environment variable_ like: + +```hocon + client.id = "" + client.id = ${KAFKA_CLIENT_ID} +``` + +Or if you put an interrogant before the env var name, it would just use it in case the variable exists, otherwise would just fallback to the default value: + +```hocon + client.id = "default-client-id" + client.id = ${?KAFKA_CLIENT_ID} +``` + +Finally, you can just set all these values from your code in a very neat way like: + +```scala +import monix.kafka._ + +val consumerConf = KafkaConsumerConfig.default.copy( + bootstrapServers = List("127.0.0.1:9092"), + groupId = "kafka-tests" +) +``` + +There are roughly 70 fields to be configured, mostly they are related with security, broker, topic, communication, consumer and producer. + +For more information about those, you would better consult either the kafka or confluent [configuration documentation](https://docs.confluent.io/current/installation/configuration/index.html). + +Consumer and Producer specific configurations would be explained in more detail on their respective sections. diff --git a/docs/consumer.md b/docs/consumer.md new file mode 100644 index 00000000..43eed287 --- /dev/null +++ b/docs/consumer.md @@ -0,0 +1,120 @@ +--- +id: consumer +title: Consumer +--- + +The _Monix Kafka_ consumer implementation relies on the underlying _Kafka Consumer API_, which would abstract the an unbounded stream of events consumed from the specified kafka topics in form of `Observable`. + +Below table shows the two available ways of consuming from _Kafka_ topics. (Version 0.11.x and above): + +| __Signature__ | __Expected elements__ | __Stream element type__ | + | :---: | :---: | :---: | + | _KafkaConsumerObservable.apply_ | No _(auto commit can be enabled)_ | `ConsumerRecord[K, V]` | + | _KafkaConsumerObservable.manualCommit_ | Manual commit | `CommittableMessage[K, V]` | + +These will be further explained in code on next sections, but first let's review the _Consumer configuration_. + +### Consumer configuration + +As mentioned on previous sections, configuration can be specified either from a `HOCON` file [.conf](https://github.com/monix/monix-kafka/blob/master/kafka-1.0.x/src/main/resources/monix/kafka/default.conf#L49) or +from the very same code. + + Below list of properties represents __only__ those parameters that are kafka consumer related properties which could give you a first glance of what to look at when configuring the consumer, but of course there +are more configurable parameters related to _Kafka_ in general. + +```hocon +kafka { + # these represents ony consumer related configurable parameters + # but you might want to set other kafka configurations that affect can consumer too + fetch.min.bytes = 1 + fetch.max.bytes = 52428800 + group.id = "" + heartbeat.interval.ms = 3000 + max.partition.fetch.bytes = 1048576 + session.timeout.ms = 10000 + auto.offset.reset = "latest" + enable.auto.commit = false + exclude.internal.topics = true + receive.buffer.bytes = 65536 + check.crcs = true + fetch.max.wait.ms = 500 + session.timeout.ms = 10000 + max.poll.records = 500 + max.poll.interval.ms = 300000 + # triggers a seekToEnd when the observable starts + monix.observable.seekEnd.onStart = false + # sync, async + monix.observable.commit.type = "sync" + # before-ack, after-ack or no-ack + monix.observable.commit.order = "after-ack" +} +``` + +For more details about what each of these configurable parameters mean, please directly review the [official confluent documentation](https://docs.confluent.io/current/installation/configuration/consumer-configs.html#cp-config-consumer) +for _Kafka Consumer Configuration_. +You could also refer to `monix.kafka.KafkaConsumerConfig` in order to know exactly what are the properties the consumer takes care of. +Note that `monix.observable.commit.type` and `monix.observable.commit.order` are not passed to Kafka, since they are monix self configurations that would be taken into account only for the +`plain consumer` but not for `manualCommit`. See next section for more info about these. + +### Plain consumer + +The `plainSource` emits `ConsumerRecord` elements, a record represents the received _key/value_ pair that also contains information about the topic, partition, offset and timestamp. +But more importantly, it __does not support offsets commitment__ to Kafka, you can then store offsets externally or with the _auto-commit_ flag. + +Note that _auto-commit_ is disabled by default, you can fine tune the auto commitment by setting the monix's observable specific configuration `ObservableCommitOrder`, +which will allow you to decide whether to commit the records before receiving an acknowledgement from downstream, after that, or to just don't acknowledge (as a default one). + +If _At Most Once_ semantics is seek, _auto-commit_ must be enabled and _observable commit order_ done before ack: + +```scala +import monix.kafka._ + +val consumerConf = KafkaConsumerConfig.default.copy( + bootstrapServers = List("127.0.0.1:9092"), + groupId = "kafka-tests", + enableAutoCommit = true, + observableCommitOrder = ObservableCommitOrder.BeforeAck +) +``` + +If the concept of _auto-commit_ and _observableCommitOrder_ was well understood, the implementation will be straight forward for you: + +```scala +import monix.kafka._ + +val observable = + KafkaConsumerObservable[String,String](consumerConf, List("my-topic")) + .take(10000) + .map(_.value()) +``` + +### Manual commit consumer: + +The `manualCommit` makes it possible to commit offset positions to Kafka. In this case the emitted record would be `CommitableMessage`, + being just a wrapper for `ConsumerRecord` with `CommittableOffset`. + +The committable offset represents a offset for specified topic and partition that can be committed synchronously by `commitSync` method call or asynchronously by one of `commitAsync` methods. + In order to achieve a better performance it is recommended to use batched commit with `CommittableOffsetBatch` class. + +Let's now see an example on how to use the batch committable offset: + +```scala +import monix.kafka._ + +val consumerCfg = KafkaConsumerConfig.default.copy( + bootstrapServers = List("127.0.0.1:9092"), + groupId = "kafka-tests" +) + +val observable = + KafkaConsumerObservable.manualCommit[String,String](consumerCfg, List("my-topic")) + .map(message => message.record.value() -> message.committableOffset) + .mapEval { case (value, offset) => performBusinessLogic(value).map(_ => offset) } + .bufferTimedAndCounted(1.second, 1000) + .mapEval(offsets => CommittableOffsetBatch(offsets).commitSync()) +``` + +In summary, this consumer is useful when _At Least Once_ delivery is desired, as each message will be delivered at least once but in failure cases could be duplicated. + +And compared with _auto commit_, it gives fine granted control over when a message is considered consumed or not. + diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 00000000..2c430574 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,145 @@ +--- +id: getting-started +title: Getting Started +--- + +This project supports different versions of _Apache Kafka_, +see in below sections how to get started with each of them: + +## Kafka 1.0.x or above + +In SBT: + +```scala +libraryDependencies += "io.monix" %% "monix-kafka-1x" % "1.0.0-RC5" +``` + +For `kafka` versions higher than `1.0.x` also add a dependency override: + +```scala +dependencyOverrides += "org.apache.kafka" % "kafka" % "2.1.0" +``` + +Or in case you're interested in running the tests of this project, it +now supports embedded kafka for integration testing. You can simply run: + +```bash +sbt kafka1x/test +``` + +## Kafka 0.11.x + +In SBT: + +```scala +libraryDependencies += "io.monix" %% "monix-kafka-11" % "1.0.0-RC5" +``` + +Or in case you're interested in running the tests of this project, it +now supports embedded kafka for integration testing. You can simply run: + +```bash +sbt kafka11/test +``` + +## Kafka 0.10.x + +In SBT: + +```scala +libraryDependencies += "io.monix" %% "monix-kafka-10" % "1.0.0-RC5" +``` + +Or in case you're interested in running the tests of this project, it +now supports embedded kafka for integration testing. You can simply run: + +```bash +sbt kafka10/test +``` + +## Kafka 0.9.x + +Please note that `EmbeddedKafka` is not supported for Kafka `0.9.x` + +In SBT: + +```scala +libraryDependencies += "io.monix" %% "monix-kafka-9" % "1.0.0-RC5" +``` + +Or in case you're interested in running the tests of this project, +first download the Kafka server, version `0.9.x` from their +[download page](https://kafka.apache.org/downloads.html) (note that +`0.10.x` or higher do not work with `0.9`), then as the +[quick start](https://kafka.apache.org/090/documentation.html#quickstart) +section says, open a terminal window and first start Zookeeper: + +```bash +bin/zookeeper-server-start.sh config/zookeeper.properties +``` + +Then start Kafka: + +```bash +bin/kafka-server-start.sh config/server.properties +``` + +Create the topic we need for our tests: + +```bash +bin/kafka-topics.sh --create --zookeeper localhost:2181 \ + --replication-factor 1 --partitions 1 \ + --topic monix-kafka-tests +``` + +And run the tests: + +```bash +sbt kafka9/test +``` + +## Kafka 0.8.x + +Please note that support for Kafka `0.8.x` is dropped and the last available version with this dependency is `0.14`. + +In SBT: + +```scala +libraryDependencies += "io.monix" %% "monix-kafka-8" % "0.14" +``` + +Or in case you're interested in running the tests of this project, +first download the Kafka server, version `0.8.x` from their +[download page](https://kafka.apache.org/downloads.html) (note that +`0.9.x` or higher do not work with `0.8`), then as the +[quick start](https://kafka.apache.org/082/documentation.html#quickstart) +section says, open a terminal window and first start Zookeeper: + +```bash +bin/zookeeper-server-start.sh config/zookeeper.properties +``` + +Then start Kafka: + +```bash +bin/kafka-server-start.sh config/server.properties +``` + +Create the topics we need for our tests: + +```bash +bin/kafka-topics.sh --create --zookeeper localhost:2181 \ + --replication-factor 1 --partitions 1 \ + --topic monix-kafka-tests +bin/kafka-topics.sh --create --zookeeper localhost:2181 \ + --replication-factor 1 --partitions 1 \ + --topic monix-kafka-manual-commit-tests +``` + +And run the tests: + +```bash +sbt kafka8/test +``` + + diff --git a/docs/producer.md b/docs/producer.md new file mode 100644 index 00000000..04f40b82 --- /dev/null +++ b/docs/producer.md @@ -0,0 +1,103 @@ +--- +id: producer +title: Producer +--- + +The _Monix Kafka_ producer module relies in the underlying _Kafka Producer API_ that would allow the application to asynchronously publish on one or more Kafka topics. + +Below table describes the two available ways of publishing events to Kafka, which both complements very well to accomplish different possible use cases, by either producing a single event or instead using the producer sink that will push an unbounded stream of events. + + + | __Signature__ | __Expects__ | __Input__ | __Described by__ | + | :---: | :---: | :---: | :---: | + | _KafkaProducer.send_ | Single record | `ProducerRecord[K, V]`, (`K`, `V`) or just `V` | `Task` | + | _KafkaProdcuerSink.apply_ | Multiple records | `Observable[Seq[ProducerRecord[K, V]]]` | `Consumer[Seq[ProducerRecord[K, V]], Unit]` | + +More details and examples can be found in the next sections: + +## Producer Configurations + +This section only mentions the producer related configurable parameters, but you might need to set other kafka configurations that can affect producer behaviour too such like buffer memory and size, security protocols and others. +As you might notice, there are not as much configurable parameters for the _Kafka Producer_ than there is for _Consumer_, but still are quite important in regards to get the best possible performance. + +```hocon +kafka { + # N. of times for the client to resend any record whose send fails with a potentially transient error. + retries = 0 + # N. of requests that KafkaProducerSink can push in parallel + monix.producer.sink.parallelism = 100 +} +``` + +For more details about all the configurable parameters, please directly review the [official confluent documentation](https://docs.confluent.io/current/installation/configuration/producer-configs.html) +for _Kafka Producer Configuration_. +You could also refer to `monix.kafka.KafkaProducerConfig` in order to know exactly what are the properties that the producer expects. + +## Single record producer + + The best way of asynchronously producing a single record to _Kafka_ is by using the `.send` method from `monix.kafka.KafkaProducer`. + It accepts different inputs, being a `ProducerRecord[K, V]`, (`K`, `V`) or just the `V`, and returns a [Task](https://monix.io/docs/3x/eval/task.html) of `Option[RecordMetadata]` can later be run and transformed into a `Future`, that: + + - If it completes with `None` it means that `producer.send` method was called after the producer was closed and therefore the message wasn't successfully acknowledged by the Kafka broker. + + - In case of failure reported by the underlying _Kafka client_, the producer will bubble up the exception and fail the `Task`. + + - Finally, all successfully delivered messages will complete with `Some[RecordMetadata]`. + + ```scala + import monix.kafka._ + + implicit val scheduler: Scheduler = monix.execution.Scheduler.global + // init producer configuration + val producerConf = KafkaProducerConfig.default.copy( + bootstrapServers = List("127.0.0.1:9092") + ) + + // builds monix kafka producer + val producer = KafkaProducer[String,String](producerConf, scheduler) + + // sends a single message + val recordMetadataF: Future[Option[RecordMetadata]] = producer.send("my-topic", "my-message").runToFuture + + // closes the connection + val closeF = producer.close().runToFuture + ``` + + ## Sink producer + + On the other hand, if an unbounded number of records needs to be produced, it is better to use `monix.kafka.KafkaProducerSink`, which provides the logic for pushing an `Observable[ProducerRecord[K, V]]` to the specified _Kafka_ topics. + + As it was mentioned in the producer configuration section, `monix.producer.sink.parallelism` allows to specify the parallelism on producing requests from `KafkaProducerSink`. + + See below an example on how to use the kafka producer sink: + + ```scala + import monix.kafka._ + import monix.reactive.Observable + import org.apache.kafka.clients.producer.ProducerRecord + + implicit val scheduler: Scheduler = monix.execution.Scheduler.global + + // init producer configuration + val producerConf = KafkaProducerConfig.default.copy( + bootstrapServers = List("127.0.0.1:9092"), + monixSinkParallelism = 3 + ) + + val producer = KafkaProducerSink[String,String](producerConf, scheduler) + + // lets pretend we have this observable of records + val observable: Observable[ProducerRecord[String,String]] = ??? + + observable + // on overflow, start dropping incoming events + .whileBusyDrop + // buffers into batches if the consumer is busy, up to a max size + .bufferIntrospective(1024) + // consume everything by pushing into Apache Kafka + .consumeWith(producer) + // ready, set, go! + .runToFuture + ``` + + diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/Commit.scala b/kafka-0.10.x/src/main/scala/monix/kafka/Commit.scala index 74354265..400d2d0a 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/Commit.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/Commit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/CommittableMessage.scala b/kafka-0.10.x/src/main/scala/monix/kafka/CommittableMessage.scala index 19a8ddc6..318f2ed8 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/CommittableMessage.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/CommittableMessage.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffset.scala b/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffset.scala index f0620885..7d28177c 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffset.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala b/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala index 8b2b098e..df389b1b 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/Deserializer.scala b/kafka-0.10.x/src/main/scala/monix/kafka/Deserializer.scala index 04194f9e..6a9fea21 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/Deserializer.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/Deserializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala index e4d94c4e..3d618d7b 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala index 26fd9cb9..34098ef9 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala index 72cf39f4..31388846 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala index 648a0cfb..87bfca09 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducer.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducer.scala index 0eb776f5..405df29f 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducer.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala index 1a490eaf..9affa6cb 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerSink.scala b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerSink.scala index 640cba0f..9c00eca5 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerSink.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/KafkaProducerSink.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/Serializer.scala b/kafka-0.10.x/src/main/scala/monix/kafka/Serializer.scala index 964ebdf9..51e33a2a 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/Serializer.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/Serializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/Acks.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/Acks.scala index 7e7ca2a7..86ef8831 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/Acks.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/Acks.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala index 832b9c5a..fbbc78e0 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/ClassName.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/ClassName.scala index cdc04187..797b11ee 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/ClassName.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/ClassName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/CompressionType.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/CompressionType.scala index 9427ac1e..d1b6c203 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/CompressionType.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/CompressionType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala index 0eb2f118..370d459f 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala index 65db39c1..59f91622 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/PartitionerName.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/PartitionerName.scala index 61291fa3..7d5c65c5 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/PartitionerName.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/PartitionerName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/SSLProtocol.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/SSLProtocol.scala index 19b85a13..185acb51 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/SSLProtocol.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/SSLProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.10.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala b/kafka-0.10.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala index 492dc2d0..db00c8f2 100644 --- a/kafka-0.10.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala +++ b/kafka-0.10.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/Commit.scala b/kafka-0.11.x/src/main/scala/monix/kafka/Commit.scala index 74354265..400d2d0a 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/Commit.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/Commit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/CommittableMessage.scala b/kafka-0.11.x/src/main/scala/monix/kafka/CommittableMessage.scala index 19a8ddc6..318f2ed8 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/CommittableMessage.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/CommittableMessage.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffset.scala b/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffset.scala index f0620885..7d28177c 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffset.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala b/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala index a7ed6f7a..c9829959 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/Deserializer.scala b/kafka-0.11.x/src/main/scala/monix/kafka/Deserializer.scala index 04194f9e..6a9fea21 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/Deserializer.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/Deserializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala index 3faede6b..8f6f30bc 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala index 26fd9cb9..34098ef9 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala index 72cf39f4..31388846 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala index 648a0cfb..87bfca09 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducer.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducer.scala index 0eb776f5..405df29f 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducer.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala index f56dd573..1b823a9b 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerSink.scala b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerSink.scala index 640cba0f..9c00eca5 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerSink.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/KafkaProducerSink.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/Serializer.scala b/kafka-0.11.x/src/main/scala/monix/kafka/Serializer.scala index 964ebdf9..51e33a2a 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/Serializer.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/Serializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/Acks.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/Acks.scala index 7e7ca2a7..86ef8831 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/Acks.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/Acks.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala index 832b9c5a..fbbc78e0 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/ClassName.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/ClassName.scala index cdc04187..797b11ee 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/ClassName.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/ClassName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/CompressionType.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/CompressionType.scala index 9427ac1e..d1b6c203 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/CompressionType.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/CompressionType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala index 0eb2f118..370d459f 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala index 65db39c1..59f91622 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/PartitionerName.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/PartitionerName.scala index 61291fa3..7d5c65c5 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/PartitionerName.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/PartitionerName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/SSLProtocol.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/SSLProtocol.scala index 19b85a13..185acb51 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/SSLProtocol.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/SSLProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.11.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala b/kafka-0.11.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala index 492dc2d0..db00c8f2 100644 --- a/kafka-0.11.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala +++ b/kafka-0.11.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/Commit.scala b/kafka-0.9.x/src/main/scala/monix/kafka/Commit.scala index 74354265..400d2d0a 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/Commit.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/Commit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/CommittableMessage.scala b/kafka-0.9.x/src/main/scala/monix/kafka/CommittableMessage.scala index 19a8ddc6..318f2ed8 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/CommittableMessage.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/CommittableMessage.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffset.scala b/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffset.scala index f0620885..7d28177c 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffset.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala b/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala index 8b2b098e..df389b1b 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/Deserializer.scala b/kafka-0.9.x/src/main/scala/monix/kafka/Deserializer.scala index 32a202fb..8f16393f 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/Deserializer.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/Deserializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala index ff080101..22e37b95 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala index c65d38a3..8d3bb62a 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala index 72cf39f4..31388846 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala index 648a0cfb..87bfca09 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducer.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducer.scala index 0eb776f5..405df29f 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducer.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala index 8e6fa914..48c89b52 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerSink.scala b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerSink.scala index 640cba0f..9c00eca5 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerSink.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/KafkaProducerSink.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/Serializer.scala b/kafka-0.9.x/src/main/scala/monix/kafka/Serializer.scala index 21bc4892..e8ea15f7 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/Serializer.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/Serializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/Acks.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/Acks.scala index 7e7ca2a7..86ef8831 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/Acks.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/Acks.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala index 832b9c5a..fbbc78e0 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/ClassName.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/ClassName.scala index cdc04187..797b11ee 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/ClassName.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/ClassName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/CompressionType.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/CompressionType.scala index 9427ac1e..d1b6c203 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/CompressionType.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/CompressionType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala index 0eb2f118..370d459f 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala index 65db39c1..59f91622 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/PartitionerName.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/PartitionerName.scala index 61291fa3..7d5c65c5 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/PartitionerName.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/PartitionerName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/SSLProtocol.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/SSLProtocol.scala index 19b85a13..185acb51 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/SSLProtocol.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/SSLProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-0.9.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala b/kafka-0.9.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala index 492dc2d0..db00c8f2 100644 --- a/kafka-0.9.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala +++ b/kafka-0.9.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/Commit.scala b/kafka-1.0.x/src/main/scala/monix/kafka/Commit.scala index 74354265..400d2d0a 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/Commit.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/Commit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/CommittableMessage.scala b/kafka-1.0.x/src/main/scala/monix/kafka/CommittableMessage.scala index 19a8ddc6..318f2ed8 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/CommittableMessage.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/CommittableMessage.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffset.scala b/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffset.scala index f0620885..7d28177c 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffset.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala b/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala index 8b2b098e..df389b1b 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/CommittableOffsetBatch.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/Deserializer.scala b/kafka-1.0.x/src/main/scala/monix/kafka/Deserializer.scala index 04194f9e..6a9fea21 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/Deserializer.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/Deserializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala index 3faede6b..8f6f30bc 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala index 6429f384..05479c91 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservable.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala index 72cf39f4..31388846 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableAutoCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala index 648a0cfb..87bfca09 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaConsumerObservableManualCommit.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducer.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducer.scala index 0eb776f5..405df29f 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducer.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala index 6b01e6b1..6b74468a 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerSink.scala b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerSink.scala index 640cba0f..9c00eca5 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerSink.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/KafkaProducerSink.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/Serializer.scala b/kafka-1.0.x/src/main/scala/monix/kafka/Serializer.scala index 964ebdf9..51e33a2a 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/Serializer.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/Serializer.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/Acks.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/Acks.scala index 7e7ca2a7..86ef8831 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/Acks.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/Acks.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala index 832b9c5a..fbbc78e0 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/AutoOffsetReset.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/ClassName.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/ClassName.scala index cdc04187..797b11ee 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/ClassName.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/ClassName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/CompressionType.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/CompressionType.scala index 9427ac1e..d1b6c203 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/CompressionType.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/CompressionType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala index 0eb2f118..370d459f 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitOrder.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala index 65db39c1..59f91622 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/ObservableCommitType.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/PartitionerName.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/PartitionerName.scala index 61291fa3..7d5c65c5 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/PartitionerName.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/PartitionerName.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/SSLProtocol.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/SSLProtocol.scala index 19b85a13..185acb51 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/SSLProtocol.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/SSLProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/kafka-1.0.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala b/kafka-1.0.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala index 492dc2d0..db00c8f2 100644 --- a/kafka-1.0.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala +++ b/kafka-1.0.x/src/main/scala/monix/kafka/config/SecurityProtocol.scala @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 by The Monix Project Developers. + * Copyright (c) 2014-2020 by The Monix Project Developers. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/project/plugins.sbt b/project/plugins.sbt index a9c701be..31cdd709 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1") addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.4") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0") \ No newline at end of file +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.1") +addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") + diff --git a/website/core/Footer.js b/website/core/Footer.js new file mode 100644 index 00000000..ad889f11 --- /dev/null +++ b/website/core/Footer.js @@ -0,0 +1,29 @@ +const React = require("react"); + +class Footer extends React.Component { + docUrl(doc, language) { + const baseUrl = this.props.config.baseUrl; + const docsUrl = this.props.config.docsUrl; + const docsPart = `${docsUrl ? `${docsUrl}/` : ""}`; + const langPart = `${language ? `${language}/` : ""}`; + return `${baseUrl}${docsPart}${langPart}${doc}`; + } + + pageUrl(doc, language) { + const baseUrl = this.props.config.baseUrl; + return baseUrl + (language ? `${language}/` : "") + doc; + } + + render() { + return ( + + ); + } +} + +module.exports = Footer; \ No newline at end of file diff --git a/website/i18n/en.json b/website/i18n/en.json new file mode 100644 index 00000000..0b773c19 --- /dev/null +++ b/website/i18n/en.json @@ -0,0 +1,38 @@ +{ + "_comment": "This file is auto-generated by write-translations.js", + "localized-strings": { + "next": "Next", + "previous": "Previous", + "tagline": "A Monix integration with Kafka.", + "docs": { + "configuration": { + "title": "Configuration" + }, + "consumer": { + "title": "Consumer" + }, + "getting-started": { + "title": "Getting Started" + }, + "overview": { + "title": "Overview" + }, + "producer": { + "title": "Producer" + } + }, + "links": { + "API Docs": "API Docs", + "Documentation": "Documentation", + "GitHub": "GitHub" + }, + "categories": { + "Documentation": "Documentation" + } + }, + "pages-strings": { + "Help Translate|recruit community translators for your project": "Help Translate", + "Edit this Doc|recruitment message asking to edit the doc source": "Edit", + "Translate this Doc|recruitment message asking to translate the docs": "Translate" + } +} diff --git a/website/package.json b/website/package.json new file mode 100644 index 00000000..54174ec0 --- /dev/null +++ b/website/package.json @@ -0,0 +1,15 @@ +{ + "license": "Apache-2.0", + "scripts": { + "examples": "docusaurus-examples", + "start": "docusaurus-start", + "build": "docusaurus-build", + "publish-gh-pages": "docusaurus-publish", + "write-translations": "docusaurus-write-translations", + "version": "docusaurus-version", + "rename-version": "docusaurus-rename-version" + }, + "devDependencies": { + "docusaurus": "^1.6.2" + } +} \ No newline at end of file diff --git a/website/pages/en/index.js b/website/pages/en/index.js new file mode 100644 index 00000000..df4483c9 --- /dev/null +++ b/website/pages/en/index.js @@ -0,0 +1,141 @@ +const React = require("react"); + +const CompLibrary = require("../../core/CompLibrary.js"); + +const variables = require(process.cwd() + "/variables.js"); + +const MarkdownBlock = CompLibrary.MarkdownBlock; +const Container = CompLibrary.Container; +const GridBlock = CompLibrary.GridBlock; + +class HomeSplash extends React.Component { + render() { + const { siteConfig, language = "" } = this.props; + const { baseUrl, docsUrl } = siteConfig; + const docsPart = `${docsUrl ? `${docsUrl}/` : ""}`; + const langPart = `${language ? `${language}/` : ""}`; + const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; + + const SplashContainer = props => ( +
+
+
{props.children}
+
+
+ ); + + const ProjectTitle = () => ( +

+ + + + {siteConfig.title} + + + + + {siteConfig.tagline} +

+ ); + + const PromoSection = props => ( +
+
+
{props.children}
+
+
+ ); + + const Button = props => ( +
+ + {props.children} + +
+ ); + + return ( + +
+ + + + + + +
+
+ ); + } +} + +class Index extends React.Component { + render() { + const { config: siteConfig, language = "" } = this.props; + const { baseUrl } = siteConfig; + +const index = ` + +[![Build Status](https://travis-ci.org/monix/monix-kafka.svg?branch=master)](https://travis-ci.org/monix/monix-kafka) +[![Maven Central](https://img.shields.io/maven-central/v/io.monix/monix-kafka-1x_2.12.svg)](https://search.maven.org/search?q=g:io.monix%20AND%20a:monix-kafka-1x_2.12) +[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-brightgreen.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/monix/monix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + + +This project provides a [Monix](https://monix.io) stream based interface for [Apache Kafka](https://kafka.apache.org/documentation.html#producerapi), +which offers the full advantage on mixing the performance and asynchronously that _Monix_ provides with the _Kafka_ based capabilities such like publish and subscribe to streams in a fault-tolerant durable way. + +### Getting Started +The latest stable version is compatible with __Monix__ _3.x_ with support __Kafka__ _2.x_, _1.x_, _0.11.x_, _0.10.x_, _0.9.x_. And published for __Scala__ _2.11_ and _2.12_. + +Add the following dependency on _sbt_ to get started with any Kafka version higher than _1.0.0_. + +\`\`\`scala +libraryDependencies += "io.monix" %% "monix-kafka-1x" % "1.0.0-RC6" +\`\`\` + +Or if you still use an older version check out how to [_get started with it_](http://localhost:3014/monix-kafka/docs/getting-started). + +`.trim(); + + const { + organization, + coreModuleName, + latestVersion, + scalaPublishVersions + } = variables; + + const latestVersionBadge = latestVersion + .replace("-", "--") + .replace("_", "__"); + + const Block = props => ( + + + + ); + + + + return ( +
+ +
+
+ {index} +
+
+
+ ); + } +} + +module.exports = Index; \ No newline at end of file diff --git a/website/sidebars.json b/website/sidebars.json new file mode 100644 index 00000000..6b467391 --- /dev/null +++ b/website/sidebars.json @@ -0,0 +1,5 @@ +{ + "docs": { + "Documentation": ["getting-started", "configuration", "producer", "consumer"] + } +} \ No newline at end of file diff --git a/website/siteConfig.js b/website/siteConfig.js new file mode 100644 index 00000000..645ad5e9 --- /dev/null +++ b/website/siteConfig.js @@ -0,0 +1,47 @@ +const repoUrl = "https://github.com/monix/monix-kafka"; + +const apiUrl = "api/monix/kafka/index.html" + +const siteConfig = { + title: "Monix Kafka", + tagline: "A Monix integration with Kafka.", + url: "https://monix.github.io/monix-kafka", + baseUrl: "/monix-kafka/", + cname: "monix.github.io/monix-kafka", + + customDocsPath: "monix-kafka-docs/target/mdoc", + + projectName: "monix-kafka", + organizationName: "monix", + + headerLinks: [ + { href: apiUrl, label: "API Docs" }, + { doc: "overview", label: "Documentation" }, + { href: repoUrl, label: "GitHub" } + ], + + headerIcon: "img/monix-logo.svg", + titleIcon: "img/monix-logo.svg", + favicon: "img/monix-logo.png", + + colors: { + primaryColor: "#122932", + secondaryColor: "#153243" + }, + + copyright: `Copyright © 2014-${new Date().getFullYear()} The Monix Developers.`, + + highlight: { theme: "github" }, + + onPageNav: "separate", + + separateCss: ["api"], + + cleanUrl: true, + + repoUrl, + + apiUrl +}; + +module.exports = siteConfig; diff --git a/website/static/css/custom.css b/website/static/css/custom.css new file mode 100644 index 00000000..1ba46366 --- /dev/null +++ b/website/static/css/custom.css @@ -0,0 +1,66 @@ +@media only screen and (min-device-width: 360px) and (max-device-width: 736px) { +} + +@media only screen and (min-width: 1024px) { +} + +@media only screen and (max-width: 1023px) { +} + +@media only screen and (min-width: 1400px) { +} + +@media only screen and (min-width: 1500px) { +} + +.nav-footer { + background: unset; +} + +.nav-footer .copyright { + color: #7c7c7c; +} + +.nav-footer .separator { + width: 350px; + margin: 0 auto; + margin-bottom: 10px; + border-top: 0; +} + +.mainContainer { + padding-bottom: 0; +} + +.mainContainer .index { + margin: 0 auto; + max-width: 650px; + padding: 0 10px; +} + +.homeSplashFade .wrapper.homeWrapper { + padding-bottom: 0; + padding-top: 25px; +} + +.projectTitleLogo { + width: 55px; + vertical-align: bottom; + margin-right: 3px; +} + +.fixedHeaderContainer header img { + margin-right: 3px; +} + +.buttonWrapper { + margin-bottom: 5px; +} + +a { + color: #19647e; +} + +.onPageNav a:hover { + color: #122932; +} \ No newline at end of file diff --git a/website/static/img/apache_kafka.png b/website/static/img/apache_kafka.png new file mode 100644 index 00000000..83b2acd2 Binary files /dev/null and b/website/static/img/apache_kafka.png differ diff --git a/website/static/img/kafka.png b/website/static/img/kafka.png new file mode 100644 index 00000000..a8ebd8b0 Binary files /dev/null and b/website/static/img/kafka.png differ diff --git a/website/static/img/monix-logo.png b/website/static/img/monix-logo.png new file mode 100644 index 00000000..4705f411 Binary files /dev/null and b/website/static/img/monix-logo.png differ diff --git a/website/static/img/monix-logo.svg b/website/static/img/monix-logo.svg new file mode 100644 index 00000000..e9979b69 --- /dev/null +++ b/website/static/img/monix-logo.svg @@ -0,0 +1,190 @@ + + + + + + image/svg+xml + + Monix - Blue + + + + + + + + Monix - Blue + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +