Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed checked exceptions from framework APIs #547

Closed
onobc opened this issue Jan 19, 2024 · 2 comments
Closed

Removed checked exceptions from framework APIs #547

onobc opened this issue Jan 19, 2024 · 2 comments
Labels
type: improvement An improvement of implementation of existing feature
Milestone

Comments

@onobc
Copy link
Collaborator

onobc commented Jan 19, 2024

As pointed out by @jonasgeiregat in #546, the checked exception on PulsarTemplate.send* is not consistent w/ other Spring templates and forces users to catch PulsarClientException always.

Let's instead return a runtime variant of PulsarClientException.

@onobc onobc added the type: improvement An improvement of implementation of existing feature label Jan 19, 2024
@onobc onobc added this to the 1.1.0-M1 milestone Jan 19, 2024
@jonas-grgt
Copy link
Contributor

Was also considering to remove PulsarClientException from PulsarProducerFactory as it had the same inconvenient effect.

@onobc
Copy link
Collaborator Author

onobc commented Jan 20, 2024

Was also considering to remove PulsarClientException from PulsarProducerFactory as it had the same inconvenient effect.

Agreed. In general, "favor unchecked exception over checked exception" is the theme and I am in favor of doing this in the PPF as well.

onobc pushed a commit to onobc/spring-pulsar that referenced this issue Jan 25, 2024
This commit replaces usages of the checked PulsarClientException with
the newly introduced unchecked PulsarException.

Resolves spring-projects#547
@onobc onobc changed the title Removed checked exception from PulsarTemplate send APIs Removed checked exceptions from framework APIs Jan 26, 2024
@onobc onobc closed this as completed in 1126c46 Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement An improvement of implementation of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants