You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up to #183. KafkaEx.latest_offset/3 and KafkaEx.earliest_offset/3 both return type [OffsetResponse.t] | :topic_not_found. On the other hand, functions like KafkaEx.fetch/3 and KafkaEx.stream/3 take an offset option that expects an integer offset.
Some options:
No change
Modify functions that accept an offset parameter to accept [OffsetResponse.t] OR an integer.
Introduce new functions that accept the array-of-struct argument
Introduce a new parameter name for the array-of-struct argument
Change the latest_offset/3 and earliest_offset/3 functions to return integers.
Introduce a helper function to turn [OffsetResponse.t] into a single integer, update the docs to make this usage more clear.
I think option 6 may be the best, followed by 2. 5 breaks the API and is probably not a good idea even though the current API is fairly unintuitive :/ 3 and 4 add complexity to existing functions without really clarifying things much. 2 introduces some incoherence, though it may be the most intuitive option.
The text was updated successfully, but these errors were encountered:
This is a follow-up to #183.
KafkaEx.latest_offset/3
andKafkaEx.earliest_offset/3
both return type[OffsetResponse.t] | :topic_not_found
. On the other hand, functions likeKafkaEx.fetch/3
andKafkaEx.stream/3
take anoffset
option that expects an integer offset.Some options:
offset
parameter to accept[OffsetResponse.t]
OR an integer.latest_offset/3
andearliest_offset/3
functions to return integers.[OffsetResponse.t]
into a single integer, update the docs to make this usage more clear.I think option 6 may be the best, followed by 2. 5 breaks the API and is probably not a good idea even though the current API is fairly unintuitive :/ 3 and 4 add complexity to existing functions without really clarifying things much. 2 introduces some incoherence, though it may be the most intuitive option.
The text was updated successfully, but these errors were encountered: