Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

project(tnt-kafka C)
project(kafka C)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

Expand All @@ -22,4 +22,4 @@ find_package(RdKafka)

include_directories(${TARANTOOL_INCLUDE_DIRS})

add_subdirectory(tnt-kafka)
add_subdirectory(kafka)
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tnt-kafka
=========
Tarantool kafka
===============
Full featured high performance kafka library for Tarantool based on [librdkafka](https://github.com/edenhill/librdkafka).

Can produce more then 150k messages per second and consume more then 140k messages per second.
Expand All @@ -8,7 +8,7 @@ Can produce more then 150k messages per second and consume more then 140k messag
* Kafka producer and consumer implementations.
* Fiber friendly.
* Mostly errorless functions and methods. Error handling in Tarantool ecosystem is quite a mess,
some libraries throws lua native `error` while others throws `box.error` instead. `tnt-kafka` returns
some libraries throws lua native `error` while others throws `box.error` instead. `kafka` returns
non critical errors as strings which allows you to decide how to handle it.

# Requirements
Expand All @@ -22,7 +22,7 @@ non critical errors as strings which allows you to decide how to handle it.

# Installation
```bash
tarantoolctl rocks install https://raw.githubusercontent.com/tarantool/tnt-kafka/master/rockspecs/tnt-kafka-scm-1.rockspec
tarantoolctl rocks install https://raw.githubusercontent.com/tarantool/tnt-kafka/master/rockspecs/kafka-scm-1.rockspec
```

# Examples
Expand All @@ -34,7 +34,7 @@ non critical errors as strings which allows you to decide how to handle it.
local fiber = require('fiber')
local os = require('os')
local log = require('log')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

local error_callback = function(err)
log.error("got error: %s", err)
Expand Down Expand Up @@ -110,7 +110,7 @@ non critical errors as strings which allows you to decide how to handle it.
local fiber = require('fiber')
local os = require('os')
local log = require('log')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

local error_callback = function(err)
log.error("got error: %s", err)
Expand Down Expand Up @@ -197,7 +197,7 @@ non critical errors as strings which allows you to decide how to handle it.
```lua
local os = require('os')
local log = require('log')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

local error_callback = function(err)
log.error("got error: %s", err)
Expand Down Expand Up @@ -244,7 +244,7 @@ non critical errors as strings which allows you to decide how to handle it.
local fiber = require('fiber')
local os = require('os')
local log = require('log')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

local error_callback = function(err)
log.error("got error: %s", err)
Expand Down Expand Up @@ -298,7 +298,6 @@ because `rd_kafka_destroy` sometimes hangs forever.

# TODO
* Ordered storage for offsets to prevent commits unprocessed messages
* Add poll call for librdkafka logs and errors
* Fix known issues
* More examples
* Better documentation
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/async_producer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local box = require('box')
local os = require('os')
local log = require('log')
local clock = require('clock')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

box.cfg{}

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/auto_offset_store_consumer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local log = require('log')
local box = require('box')
local os = require('os')
local clock = require('clock')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

box.cfg{
memtx_memory = 524288000, -- 500 MB
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/manual_offset_store_consumer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local box = require('box')
local os = require('os')
local log = require('log')
local clock = require('clock')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

box.cfg{
memtx_memory = 524288000,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/sync_producer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local box = require('box')
local log = require('log')
local os = require('os')
local clock = require('clock')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

box.cfg{
memtx_memory = 524288000, -- 500 MB
Expand Down
6 changes: 3 additions & 3 deletions tnt-kafka/CMakeLists.txt → kafka/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include_directories(${CMAKE_SOURCE_DIR}/tnt-kafka)
include_directories(${CMAKE_SOURCE_DIR}/kafka)

add_library(tntkafka SHARED tnt_kafka.c callbacks.c consumer.c consumer_msg.c producer.c queue.c common.c)

Expand All @@ -10,5 +10,5 @@ endif(APPLE)
target_link_libraries(tntkafka ${RDKAFKA_LIBRARY} pthread)

set_target_properties(tntkafka PROPERTIES PREFIX "" OUTPUT_NAME "tntkafka")
install(TARGETS tntkafka LIBRARY DESTINATION ${TARANTOOL_INSTALL_LIBDIR}/tnt-kafka)
install(FILES init.lua DESTINATION ${TARANTOOL_INSTALL_LUADIR}/tnt-kafka)
install(TARGETS tntkafka LIBRARY DESTINATION ${TARANTOOL_INSTALL_LIBDIR}/kafka)
install(FILES init.lua DESTINATION ${TARANTOOL_INSTALL_LUADIR}/kafka)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tnt-kafka/init.lua → kafka/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local log = require("log")
local fiber = require('fiber')
local tnt_kafka = require("tnt-kafka.tntkafka")
local tnt_kafka = require("kafka.tntkafka")

local Consumer = {}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package = "tnt-kafka"
package = "kafka"
version = "0.4.0-1"
source = {
url = "git://github.com/tarantool/tnt-kafka.git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package = "tnt-kafka"
package = "kafka"
version = "0.4.1-1"
source = {
url = "git://github.com/tarantool/tnt-kafka.git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package = "tnt-kafka"
package = "kafka"
version = "dev-1"
source = {
url = "git://github.com/tarantool/tnt-kafka.git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package = "tnt-kafka"
package = "kafka"
version = "scm-1"
source = {
url = "git://github.com/tarantool/tnt-kafka.git",
Expand Down
22 changes: 0 additions & 22 deletions rockspecs/tnt-kafka-0.3.4-1.rockspec

This file was deleted.

2 changes: 1 addition & 1 deletion tests/consumer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local box = require("box")
local log = require("log")
local os = require("os")
local fiber = require('fiber')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

local consumer = nil
local errors = {}
Expand Down
2 changes: 1 addition & 1 deletion tests/producer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local os = require('os')
local box = require('box')
local log = require('log')
local fiber = require('fiber')
local tnt_kafka = require('tnt-kafka')
local tnt_kafka = require('kafka')

local TOPIC_NAME = "test_producer"

Expand Down