Conversation
lib/poseidon/produce_result.rb
Outdated
There was a problem hiding this comment.
Could produce_partition_repsonse.error ever be nil? If so, would that mean there was no error?
There was a problem hiding this comment.
If should only ever be zero if there is no error.
|
Seems cool. Might be worth documenting a use-case somewhere |
There was a problem hiding this comment.
Typo in this sentence.
|
@kerinin true. I'll add it to the top-level Producer example |
|
@kerinin @atharrison There is also another route that we could go which is providing a future-like object which the user would iterate through once completed. |
|
@bpot returning an iterator could get complicated with the retries - this seems like a more straightforward approach. |
|
Having a Callback seems more Ruby-esque, while having a Future that you block on reading the results from feels more 'concurrent'. |
|
Cool. Just realized this design didn't consider errors that occur before we send the request (like not being able to connect to a leader). I don't know if it makes sense to overload the |
Adds a callback that can be used to determine which messages failed to send and why.