Skip to content

Conversation

onobc
Copy link
Collaborator

@onobc onobc commented Aug 28, 2022

See #68

@sobychacko @alpreu
I am still narrowing down the choice of fluent method styling.

More naturally readable ('with' on suffix - current choice)

pulsarTemplate
    .newMessage("foo")
    .toTopic("topic-1")
    .routedWith(fooRouter)
    .customizedWith(fooKeyCustomizer)
    .sendAsync();

More typical builder style ('with' on prefix)

pulsarTemplate
    .newMessage("foo")
    .withDestinationTopic("topic-1")
    .withCustomRouter(fooRouter)
    .withMessageCustomizer(fooKeyCustomizer)
    .sendAsync();

More brief/terse

pulsarTemplate
    .newMessage("foo")
    .to("topic-1")
    .router(fooRouter)
    .customizer(fooKeyCustomizer)
    .sendAsync();			

Wdyt?

@alpreu
Copy link
Contributor

alpreu commented Aug 29, 2022

I like the 'more typical builder style' as well as 'more brief/terse' but this is just personal preference :)

@onobc onobc force-pushed the cbono-fluent-template branch from 1e1d6de to cca3115 Compare August 29, 2022 19:36
@onobc onobc force-pushed the cbono-fluent-template branch from cca3115 to c1d155e Compare August 29, 2022 19:42
@sobychacko sobychacko merged commit c1d155e into spring-projects:main Aug 29, 2022
@onobc onobc deleted the cbono-fluent-template branch September 11, 2022 17:30
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

Successfully merging this pull request may close these issues.

3 participants