haubur opened a new issue, #3947: URL: https://github.com/apache/iggy/issues/3947
### Bug description **Situation** On shutdown() the IggyProducer calls the shutdown() method of the Dispatcher which broadcasts a termination signal to it's workers: https://github.com/apache/iggy/blob/cc269ef70ef2d78af5102f5560b5b03c9dd81401/core/sdk/src/clients/producer_dispatcher.rs#L187 this immediately breaks the loop of the callback task: https://github.com/apache/iggy/blob/cc269ef70ef2d78af5102f5560b5b03c9dd81401/core/sdk/src/clients/producer_dispatcher.rs#L53-L74 The shutdown() of the Shards, however, is graceful and everything in buffer still gets flushed. If the flush fails, messages that were supposed to be handled by a ErrorCallback are not, because nothing listens anymore on that channel and the error remains silent: https://github.com/apache/iggy/blob/cc269ef70ef2d78af5102f5560b5b03c9dd81401/core/sdk/src/clients/producer_sharding.rs#L268 **Problem** Messages that were not send and come back at ErrorCtx.messages cannot be handled and are permanently lost. On default, which logs the ErrorCtx the log does not trigger. ### Affected area / component Rust SDK ### Deployment None ### Versions _No response_ ### Hardware / environment _No response_ ### Sample code _No response_ ### Logs _No response_ ### Iggy server config _No response_ ### Reproduction _No response_ ### Contribution - [x] I'm willing to submit a pull request to fix this bug ### Good first issue - [ ] I think this could be a good first issue for a new contributor -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
