kafcache

Memcached and Redis for Kafka Streams

Лицензия

Лицензия

Группа

Группа

com.madewithtea
Идентификатор

Идентификатор

kafcache_2.12
Последняя версия

Последняя версия

1.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

kafcache
Memcached and Redis for Kafka Streams
Организация-разработчик

Организация-разработчик

com.madewithtea
Система контроля версий

Система контроля версий

https://github.com/jpzk/kafcache

Скачать kafcache_2.12

Как подключить последнюю версию

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

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
org.scala-lang : scala-library jar 2.12.8
org.scalameta : mdoc_2.12 jar 1.3.1
org.apache.kafka : kafka-streams jar 2.3.0
org.apache.kafka : kafka-streams-scala_2.12 jar 2.3.0
com.github.cb372 : scalacache-memcached_2.12 jar 0.28.0
commons-codec : commons-codec jar 1.13

test (1)

Идентификатор библиотеки Тип Версия
org.scalatest : scalatest_2.12 jar 3.0.8

Модули Проекта

Данный проект не имеет модулей.

kafcache

Codacy Badge Maven Central

In-memory Kafka Streams state store backends for low latency state store lookups. In the current version only memcached is available.

Dependency

libraryDependencies += "com.madewithtea" %% "kafcache" % "1.3.0" 

Use Memcached

Memcached does not support binary keys, therefore the byte arraywill be serialized as hex string. For more information on Memcached have a look at its documentation on https://memcached.org/.

  import com.madewithtea.kafcache.MemcachedStoreSupplier

  val store = Stores
    .keyValueStoreBuilder(
      new MemcachedStoreSupplier("state-store-name", "localhost:11211"),
      Serdes.ByteArray(),
      Serdes.ByteArray()
    )
  .withLoggingEnabled(new java.util.HashMap[String, String]())

Skip recovery

The following code will initialize a state store but it will not write to it in the recovery process. Hence, the recovery is much faster than doing actual writes.

  import com.madewithtea.kafcache.MemcachedStoreSupplier

  val store = Stores
    .keyValueStoreBuilder(
      new MemcachedStoreSupplier("state-store-name", "localhost:11211", recover = false),
      Serdes.ByteArray(),
      Serdes.ByteArray()
    )
  .withLoggingEnabled(new java.util.HashMap[String, String]())

Версии библиотеки

Версия
1.3.0
1.2.0
1.1.0
1.0.0