Commit Graph

400 Commits

Author SHA1 Message Date
accelerated
532d83b225 Removed reserve() and synced consumer::poll_batch and queue::poll_batch functions 2018-05-29 09:55:30 -04:00
accelerated
a1ce130bfd changes as per code review 2018-05-29 09:55:29 -04:00
accelerated
71afaba3e1 added support for different topics/partitions 2018-05-29 09:55:29 -04:00
accelerated
15be627f8e intial polling version 2018-05-29 09:55:29 -04:00
Alex Damian
429ec92369 Buffered producer thread safe (#72)
* Thread safe buffered producer

* Using single mutex version

* Changed based on feedback

* Changes based on latest review

* Added flush counter
2018-05-28 18:33:36 -07:00
Alex Damian
f543810515 Allow metadata object to be non-owning (#73) 2018-05-28 11:30:01 -07:00
Alex Damian
841e632fbd Allow access to the user-supplied delivery callback. (#66)
* Allow access to the user-supplied delivery callback.

* Remove valgrind warning

* Added buffer size watermark

* added ability to produce a message directly

* Updated on_delivery_report function
2018-05-24 20:59:41 -07:00
Alex Damian
46c396f729 Pause/resume a consumer by topic (#67)
* Pause a consumer by topic

* Changes per review comments

* convert rvalue to value

* Refactored code to provide a more generic way of getting partition subsets

* Changes per code review and added test cases

* Modified loop to use binary search instead of linear

* Simplify find_matches test cases
2018-05-23 13:03:47 -07:00
amirshavit
ee71b3979a Add yield (#64)
Simply calls rd_kafka_yield; allows consumers and producers to abort the
current callback dispatcher.
2018-05-23 09:26:09 -07:00
Alex Damian
d9feb5c3db Added retry limit for the backoff performer class (#70) 2018-05-23 09:16:12 -07:00
Azat Khuzhin
2451c74c4f Avoid SIGSEGV during destructing KafkaHandleBase (with set_log_callback()) (#68)
Configuration should exist for logging, since it contains the copy of
the callback.
2018-05-19 13:24:57 -07:00
Alex Damian
ae74814791 Log error in case consumer destructor throws (#61) 2018-04-27 07:03:47 -07:00
Matias Fontanini
ee0c0829a4 Remove extra line at the end of cppkafka.h 2018-04-23 19:23:09 -07:00
Matias Fontanini
59d8adc4a4 Sort header files before generating cppkafka.h 2018-04-23 19:22:41 -07:00
Matias Fontanini
cb2c8877d8 Move tests to use catch instead of googletest (#56)
* Port buffer test to use Catch2

* Move compacted topic processor test to Catch2

* Move configuration tests to Catch2

* Rename configuration test cases

* Move topic partition list test to Catch2

* Move handle base tests to Catch2

* Move producer tests to Catch2

* Move consumer tests to catch2

* Use CHECK on tests when appropriate

* Remove googletest

* Show tests' progress as they run

* Update message when Catch2 is not checked out

* Remove references to googletest

* Run cppkafka_tests manually on travis

* Print amount of time taken by each test case
2018-04-24 03:20:48 +01:00
Alex Damian
30b3652a94 auto-gen main header file (#59) 2018-04-24 02:32:43 +01:00
Alex Damian
8fc6a0f02d Print offset when dumping partition object (#55) 2018-04-24 02:32:14 +01:00
Alex Damian
83a963c1db Added commit for current assignment and message state checks (#53) 2018-04-20 23:51:44 +01:00
Andrei Ovsiankin
c95d790547 Added cmake option for disabling tests (#51)
* Added cmake option for disabling tests

* Renamed cmake option for tests

* comment fixed

* Misprint
2018-04-20 05:00:34 -07:00
Matias Fontanini
eee60407fa Use CPPKAFKA_API for friends and free functions 2018-04-11 10:47:53 -07:00
Matias Fontanini
05d5a0404b Merge pull request #47 from accelerated/master
Fixed deprecated error function call
2018-04-03 19:04:39 -07:00
accelerated
3d1402f53a Fixed font 2018-04-03 12:04:26 -04:00
accelerated
6db2cdcecf Fixed font 2018-04-03 12:02:21 -04:00
accelerated
018a1f52d9 Fixed deprecated error librdkafka function 2018-04-03 11:58:21 -04:00
Matias Fontanini
df12b5fd5c Fix linking issues on Windows
Relates to #10
2018-03-20 08:12:04 -07:00
Matias Fontanini
9513b01b8e Don't use quotes when expanding DEPENDENCIES 2018-03-19 07:04:59 -07:00
Matias Fontanini
86ed154c92 Link with ws2_32.lib on Windows 2018-03-18 18:57:09 -07:00
Matias Fontanini
69e30f9e74 Merge pull request #39 from arvidn/destruction
destruct callbacks (and their closures)
2018-03-17 15:42:21 -07:00
Matias Fontanini
675954ef75 Merge pull request #40 from arvidn/poll-batch-performance
improve performance of Consumer::poll_batch()
2018-03-17 15:41:21 -07:00
arvidn
98b9839ff9 improve performance of Consumer::poll_batch() by allocating the results array once, rather than incremental growth. Also avoid checking every single pointer in the returned array, just use the returned counter instead 2018-02-08 12:22:11 +01:00
arvidn
d173526f99 destruct callbacks (and their closures) to ensure there are no reference cycles when destructing the consumer. This solves a hang in rd_kafka_destroy 2018-02-08 11:51:36 +01:00
Matias Fontanini
deff8b1ff3 Merge pull request #27 from alkenet/patch-1
Update README.md
2017-11-28 20:28:00 -08:00
atravers
cc7d183ff1 Update README.md
Should there not be a flush at the end? In my case, the application quit without the message ending up on Kafka.
2017-11-29 13:03:02 +09:00
Matias Fontanini
1817115784 Merge pull request #22 from mfontanini/mfontanini-patch-1
Use latest kafka version in travis
2017-11-21 09:19:21 -08:00
Matias Fontanini
9c09243633 Use latest kafka version in travis 2017-11-21 06:51:53 -08:00
Matias Fontanini
5b63c642f9 Merge pull request #21 from spektom/patch-1
Check for existing custom target: uninstall
2017-11-21 06:47:23 -08:00
Michael Spector
c874ccc43f Check for existing custom target: uninstall
When including `cppkafka` in a CMake project containing other project defining the same target (`curl`, specifically, which defines the same target [here](3ea7679057/CMakeLists.txt (L1293))) I get the foollowing error:

```
add_custom_target cannot create target "uninstall" because another target  with the same name already exists
```

This if condition fixes the issue.
2017-11-21 10:14:29 +02:00
Matias Fontanini
af368bba04 Merge pull request #16 from arvidn/include-dir
make sure dependent targets get the include directory added correctly
2017-11-11 14:02:32 -08:00
arvidn
c7715733bf make sure dependent targets get the include directory added correctly 2017-10-25 20:50:59 +02:00
Matias Fontanini
80e0ed5007 Merge pull request #18 from arvidn/consumer-typo
fix typo in consumer documentation
2017-10-25 11:28:56 -07:00
arvidn
a1dc9d115e fix typo in consumer documentation 2017-10-25 20:26:35 +02:00
Matias Fontanini
edb2737263 Merge pull request #17 from arvidn/typo
fix typo in README
2017-10-24 14:08:05 -07:00
arvidn
5bd61e8915 fix typo in README 2017-10-24 22:26:54 +02:00
Matias Fontanini
0e96f87eeb Wait for kafka to come up in travis build 2017-10-14 10:40:36 -07:00
Matias Fontanini
702279d0e9 Add travis CI badge to README.md 2017-10-14 10:28:42 -07:00
Matias Fontanini
94dac08d79 Merge pull request #14 from mfontanini/travis
Add travis CI build file
2017-10-14 10:28:25 -07:00
Matias Fontanini
29fa7bed19 Add travis CI build file 2017-10-14 08:41:52 -07:00
Matias Fontanini
179e669c06 Assume testing kafka cluster is >= 0.10 2017-10-14 08:41:33 -07:00
Matias Fontanini
853396acab Fix Consumer::poll_batch test 2017-10-14 08:41:33 -07:00
Matias Fontanini
5889c322c2 Fix link issues when building in clang 2017-10-02 10:31:02 -07:00