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

Add fluent API for PulsarTemplate #68

Closed
onobc opened this issue Aug 23, 2022 · 0 comments
Closed

Add fluent API for PulsarTemplate #68

onobc opened this issue Aug 23, 2022 · 0 comments
Assignees
Milestone

Comments

@onobc
Copy link
Collaborator

onobc commented Aug 23, 2022

This will avoid API signature permutation explosion as we extend the API in the future, thus avoiding a maintenance headache.

We will offer a hybrid API that consists of the following:

  • Keep the following existing non-fluent API for simple use cases:

    send(message)
    send(topic, message)
    sendAsync(message)
    sendAsnyc(topic, message)
  • Replace all other variants w/ a fluent based DSL as such:

    template.prepare()
        .message("5150")
        .toTopic("topic-one")
        //.toDefaultTopic()
        .withRouter(customRouter)
        .withInterceptor(customInterceptor)
        .withCustomizer(messageKeyCustomizer)
        .send(); // .sendAsync()

Points to consider

@onobc onobc added this to the 0.1.0-M1 milestone Aug 23, 2022
@onobc onobc self-assigned this Aug 23, 2022
onobc added a commit to onobc/spring-pulsar that referenced this issue Aug 28, 2022
onobc added a commit to onobc/spring-pulsar that referenced this issue Aug 28, 2022
onobc added a commit to onobc/spring-pulsar that referenced this issue Aug 28, 2022
onobc added a commit to onobc/spring-pulsar that referenced this issue Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant