beelis opened a new pull request, #24122: URL: https://github.com/apache/pulsar/pull/24122
Fixes #24121 ### Motivation When an error occurs during the sending of a message using `NewOutputMessage`, the go function exits with a panic. This behavior prevents the application from handling the error gracefully, as it bypasses any error-handling logic. Errors should be returned by `NewOutputMessage` so they can be handled by the calling code, rather than causing a panic. ### Modifications Return the error on `NewOutputMessage` ### Verifying this change - [x] Make sure that the change passes the CI checks. This change is a trivial rework / code cleanup without any test coverage. ### Does this pull request potentially affect one of the following parts: - [ ] Dependencies (add or upgrade a dependency) - [ ] The public API - [ ] The schema - [ ] The default values of configurations - [ ] The threading model - [ ] The binary protocol - [ ] The REST endpoints - [ ] The admin CLI options - [ ] The metrics - [ ] Anything that affects deployment ### Documentation - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> ### Matching PR in forked repository PR in forked repository: https://github.com/beelis/pulsar/tree/enhancements/24121/Return-error-on-NewOutputMessage -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org