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

Add support for rack id #543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ditas
Copy link

@ditas ditas commented Nov 29, 2022

Allow to provide rack id for kpro_req_lib:fetch/9 function

Copy link
Contributor

@zmstone zmstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +99 to +105
kpro_req_lib:fetch(Vsn, Topic, Partition, Offset,
#{ max_wait_time => WaitTime
, min_bytes => MinBytes
, max_bytes => MaxBytes
, isolation_level => IsolationLevel
, rack_id => RackId
}).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kpro_req_lib:fetch(Vsn, Topic, Partition, Offset,
#{ max_wait_time => WaitTime
, min_bytes => MinBytes
, max_bytes => MaxBytes
, isolation_level => IsolationLevel
, rack_id => RackId
}).
kpro_req_lib:fetch(Vsn, Topic, Partition, Offset,
#{ max_wait_time => WaitTime
, min_bytes => MinBytes
, max_bytes => MaxBytes
, isolation_level => IsolationLevel
, rack_id => RackId
}).

@zmstone
Copy link
Contributor

zmstone commented Dec 5, 2022

Hi @ditas
Thank you for the PR.
I'm not quite familiar with the rack_id feature from Kafka.
Does it imply that you can fetch from any broker in the cluster?
If that's the case, it might not be very useful here because brod_consumer always fetches from the partition leader.

@zmstone
Copy link
Contributor

zmstone commented Dec 5, 2022

fetch/8 should call fetch/9 (with ?undef as the last arg).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants