Skip to content

Add support for rack id - #543

Open
ditas wants to merge 1 commit into
kafka4beam:masterfrom
ditas:feature/support_rack_id
Open

Add support for rack id#543
ditas wants to merge 1 commit into
kafka4beam:masterfrom
ditas:feature/support_rack_id

Conversation

@ditas

@ditas ditas commented Nov 29, 2022

Copy link
Copy Markdown

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

@zmstone zmstone left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

zmstone commented Dec 5, 2022

Copy link
Copy Markdown
Contributor

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

zmstone commented Dec 5, 2022

Copy link
Copy Markdown
Contributor

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