lianetm commented on PR #17440: URL: https://github.com/apache/kafka/pull/17440#issuecomment-2517875078
Hey @m1a2st , sorry I had missed the ShareConsumer question before. Seems we have different needs in the 2 consumers, so we should support notifying metadata errors via the generic error queue still, but to be used only from the ShareConsumer. The AsyncConsumer would not require such notification mechanism, given that it does have triggering API events that need to be completed with the error (so avoiding duplicated way of propagation on the async consumer, that we've seen how it becomes problematic). Why do you think we need a new event? One option could be to simply have the flag that both consumers set differently: ShareConsumer creates the networkClients with a notifyMetadataErrorsViaErrorQueue=true, the async consumer with false, and then the network clients knows what to do based on that param. ``` private void maybePropagateMetadataError() { ... if (notifyMetadataErrorsViaErrorQueue) { backgroundEventHandler.add(new ErrorEvent(e)); } else { metadataError = Optional.of(e); } ... } ``` Would that work to cover the needs of both consumers? thoughts? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org