Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh metadata if necessary on deliver_message #901

Merged
merged 2 commits into from
May 18, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changes and additions to the library will be listed here.

## Unreleased

- Refresh a stale cluster's metadata if necessary on `Kafka::Client#deliver_message` (#901).
- Fix `Kafka::TransactionManager#send_offsets_to_txn` (#866).
- Add support for `murmur2` based partitioning.
- Add `resolve_seed_brokers` option to support seed brokers' hostname with multiple addresses (#877).
Expand Down
2 changes: 2 additions & 0 deletions lib/kafka/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def deliver_message(value, key: nil, headers: {}, topic:, partition: nil, partit
attempt = 1

begin
@cluster.refresh_metadata_if_necessary!

operation.execute

unless buffer.empty?
Expand Down