Releases: morganstanley/modern-cpp-kafka
v2024.07.03
This release cooperates with librdkafka
v2.4.0 and includes the following fixes and enhancements:
- Fixed OAuth related issues
- OAuth callback expiration should be milliseconds instead of microseconds
- Avoid throwing exception in
KafkaClient::oauthbearerTokenRefreshCallback
when OAuthBearer is not configured - Log error info for config issues in
KafkaClient
constructor
- Added OpenSSF Scorecard analysis
- Removed
DEBUG
fromkafka::clients::Config
- Removed
KafkaConsumer::poll(std::chrono::milliseconds timeout, std::vector<consumer::ConsumerRecord>& output)
fromkafka::clients::consumer::KafkaConsumer
- Re-organized console client tools from
tools
toconsole_clients
folder - Updated CI platform from
ubuntu-22.04
toubuntu-24.04
- Fixed build failures on Windows x64 and Ubuntu
v2023.03.07
This release cooperates with librdkafka
v2.0.2 (not compatible with librdkafka
v1.x.x)
- Updated README and examples.
- Removed error warning from log while a Kafka client is configured with
enable.manual.events.poll
. - Added new interceptor for Kafka broker state change.
v2023.01.05
This release cooperates with librdkafka
v1.9.2
-
Namespace changes
kafka::clients::producer::KafkaProducer
(instead ofkafka::clients::KafkaProducer
)kafka::clients::consumer::KafkaConsumer
(instead ofkafka::clients::KafkaConsumer
)kafka::clients::admin::AdminClient
(instead ofkafka::clients::AdminClient
)
-
Legacy interface removed
- No
setLogger(...)
/setErrorCallback(...)
/setStatsCallback(...)
/setOauthbearerTokenRefreshCallback(...)
any more. - No
EventsPollingOption
parameter for Kafka client initialization. - No
Interceptor
parameter for Kafka client initialization.
- No
-
New
Properties
- It contains all configuration info to initialize a Kafka client. The property value type could be
std::string
: Most are from librdkafka configuration.std::function<...>
: Callbacks forlog_cb
,error_cb
,stats_cb
oroauthbearer_token_refresh_cb
.Interceptors
- New configuration property:
enable.manual.events.poll
.
- It contains all configuration info to initialize a Kafka client. The property value type could be
-
Default behavior changed
enable.auto.commit=true
forKafkaConsumer
by default
v2022.10.12
This release cooperates with librdkafka
v1.9.2
-
New interface:
Interceptors
for threads start/exit -
KafkaProducer
: default transactional timeout changed toinfinite
-
windows
platform: avoid conflicts with macros (e.g.min
,max
) fromwindows.h
-
Logging: remove some sensitive info from log
-
Fix build failure:
CMake
failed to find pre-installed packagerapidjson
v2022.06.15
This release cooperates with librdkafka
v1.8.2
-
Remove sensitive info (e.g. password related configurations for properties) from log
-
Some trivial improvements (to avoid
clang-tidy
warnings)
v2022.04.11
This release cooperates with librdkafka
v1.8.2
-
Bazel build support
-
Improve CMake project
-
Some trivial fixes
v2021.12.08
This release cooperates with librdkafka
v1.7.0
-
Make the
ConsumerRecord
copyable -
New addon:
KafkaMetrics
- It helps to parse the statistics string (with JSON format) from
librdkafka
- It helps to parse the statistics string (with JSON format) from
v2021.10.21
This release cooperates with librdkafka
v1.7.0
-
Unify
KafkaAsyncProducer
&KafkaSyncProducer
intoKafkaProducer
- New interface
syncSend(...)
for synchronous operation
- New interface
-
Unified
KafkaAutoCommitConsumer
&KafkaManualCommitConsumer
intoKafkaConsumer
-
Refine the namespaces
-
Use lowercased namespace names
- E.g.
kafka
,kafka::clients
,kafka::utility
, etc
- E.g.
-
New namespace
kafka::clients
for Kafka clients and related types-
kafka::clients::KafkaProducer
-
kafka::clients::producer
-
Config
-
RecordMetadata
-
Callback
-
-
kafka::clients::KafkaConsumer
-
kafka::clients::consumer
-
Config
-
RebalanceCallback
-
OffsetCommitCallback
-
ConsumerGroupMetadata
-
UnorderedOffsetCommitQueue
-
-
kafka::clients::AdminClient
-
kafka::clients::admin
-
Config
-
CreateTopicsResult
-
DeleteTopicsResult
-
ListTopicsResult
-
DeleteRecordsResult
-
-
-
-
New addon:
KafkaRecoverableProducer
- A wrapper over
KafkaProducer
, which would internally re-initialize the underlying producer for fatal errors
- A wrapper over
v2021.08.25
This release cooperates with librdkafka
v1.7.0
-
Support
windows
platform -
New interface for
AdminClient
Admin::DeleteRecordsResult deleteRecords(const TopicPartitionOffsets& topicPartitionOffsets, std::chrono::milliseconds)
-
Incremental cooperative rebalancing support for
KafkaConsumer
- I.e.
partition.assignment.strategy=cooperative-sticky
- I.e.
-
Unified
Error
type-
No
std::error_code
(for interfaces) anymore -
Type
Error
is convertible tostd::error_code
-
-
New interface for error notification
KafkaClient::setErrorCallback(std::function<void(const Error&)> errorCb)
-
Fixed issue for
KafkaConsumer
subscribe(...)
/unsubscribe(...)
returned too soon (before the "partition-rebalance events" being triggered)
v2021.05.25
This release cooperates with librdkafka
v1.7.0
-
Improved
subscribe(...)
/unsubscribe(...)
interfaces (with an additionaltimeout
parameter) forKafkaConsumer
-
Set default
log_level
asNOTICE
(5
) (for all client types) -
Fixed
C++14
build failure