Open anglinb opened 5 hours ago
@anglinb better imo ProducerError
,
Would it be a good idea map to a more specific error like QueueFullException
?
Looking into this more, seem like we might need to call poll, when using the ConfluentRdKafkaInstance
https://github.com/confluentinc/librdkafka/issues/4772#issuecomment-2306397276
@anglinb better imo
ProducerError
,
Yeah this is good with me!
Would it be a good idea map to a more specific error like
QueueFullException
?
I'm not sure, I guess it matters how you're going to handle it. It's seeming like the Exception is actually more related to not calling poll
so I'm wondering if this is something you'd see frequently or not. If it's relatively infrequent (and we can fix the issue by calling poll after every produce, as indicated in some threads about the issue), then I'd opt for a generic error that maybe has some sub-types b/c then as a developer, I'm thinking. "Something unexpected happened" -> "retry policy", instead of QueueFullException
-> "do something specific"?? I guess it just depends on how many things can happen. Lmk if that makes sense.
I also patched the library locally to call poll
after every produce to see if it fixes the issue or not, we'll see 👀
then I'd opt for a generic error that maybe has some sub-types b/c then as a developer, I'm thinking. "Something unexpected happened" -> "retry policy", instead of QueueFullException -> "do something specific"??
I agree , if it can be handled there is no point to expose the error.
The current signature for
send
is:const send: (record: Producer.Producer.ProducerRecord) => Effect.Effect<Producer.Producer.RecordMetadata[], never, Producer.Producer>
I just ran into this error which caused the program to die:
(This was when using the RdKafka driver)
I think we should add a generic
ProductionError
the wayRequestError
andResponseError
work in the Http library.