Commit Graph

226 Commits

Author SHA1 Message Date
Alex Damian
eb46b8808e Bug fixes for sync flush and add_tracker (#91)
* fixes for sync flush and also add_tracker

* added flag for flush
2018-06-18 14:46:31 -07:00
Alex Damian
b8f4be5e1b Increase buffer construction requirements (#88)
* Fix crash in Buffer with null pointer and non-zero length

* Throw inside Buffer constructor instead
2018-06-18 09:09:48 -07:00
Matias Fontanini
9a20b588c5 Merge pull request #86 from accelerated/flush_with_timeout
Added timeout to flush and wait_for_acks
2018-06-14 10:14:44 -07:00
accelerated
3c72eb5752 Added timeout to flush and wait_for_acks 2018-06-14 11:43:12 -04:00
Matias Fontanini
157b7ec997 Merge pull request #79 from accelerated/purge
Added purge (aka async_flush) functionality
2018-06-12 09:30:58 -07:00
accelerated
f220062e40 Changed purge to async_flush 2018-06-12 10:23:48 -04:00
accelerated
7530b9f9e4 added method to empty the buffer when max limit is reached 2018-06-12 09:21:55 -04:00
accelerated
3cf9bb53e9 Added purge (aka async_flush) functionality 2018-06-12 09:17:41 -04:00
Matias Fontanini
0c7a3b0c25 Merge pull request #78 from accelerated/producer_retry
Producer retry
2018-06-11 20:45:37 -07:00
accelerated
972a008aa4 Changed test to produce twice the same MessageBuilder 2018-06-11 15:45:41 -04:00
accelerated
a4eefacaa1 concurrency issues in MessageBuilder internal data 2018-06-10 18:48:51 -04:00
accelerated
23810654ab Removed dependency on Producer and dr_callback_proxy 2018-06-10 13:00:56 -04:00
accelerated
f746653841 Added logic to conditionally enable internal data 2018-06-10 13:00:56 -04:00
accelerated
597c026555 Prevent MessageInternal structures if there is no delivery callback registered 2018-06-10 13:00:56 -04:00
accelerated
71e6e2e4e5 added retry logic for producers 2018-06-10 13:00:55 -04:00
Matias Fontanini
f15b59cb13 Fix compacted topic processor test
* Use buffered producer on compacted topic processor test

* Add include directives for callback invoker where missing

* Consume until EOF on compacted topic processor test
2018-06-09 14:49:50 -07:00
sachnk
5dcede6411 #81: add detail headers to installation (#82) 2018-06-09 10:32:10 -07:00
Alex Damian
5cad740aea Added access to the internal Consumer in the backoff committer (#75)
* Added access to the internal Consumer and provided non-default constructor for BackoffPerformer

* added sync_produce and deleted the value constructor

* removed sync_produce methods

* removed value constructor in backoff_performer class
2018-06-04 11:48:20 -07:00
Alex Damian
9714bec5bf Callback invoker to sink all thrown exceptions (#74) 2018-06-01 16:35:56 -07:00
Matias Fontanini
15fdab6943 Merge pull request #63 from accelerated/partition_poll
round robin polling for assigned partitions
2018-05-30 11:15:02 -07:00
accelerated
ea9601ba1b Changes per code review 2018-05-29 10:05:56 -04:00
accelerated
ffc64b9a5a Remove valgrind warning 2018-05-29 10:05:56 -04:00
accelerated
556f15a43f Allow access to the user-supplied delivery callback. 2018-05-29 09:59:19 -04:00
accelerated
6144330835 added test case for polling strategy refactored the strategy class 2018-05-29 09:55:30 -04:00
accelerated
169ea4f8ed Fixes to queue polling and making them non-owning 2018-05-29 09:55:30 -04:00
accelerated
65f35dcd39 fix cppkafka::MessageList declaration 2018-05-29 09:55:30 -04:00
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