rabbitmq-java-client
rabbitmq-java-client copied to clipboard
ConnectionFactory: fluent style
It would be useful if the API of ConnectionFactory
supported fluent style. For example:
Connection c = new ConnectionFactory().setUri(...).newConnection();
Connection c = new ConnectionFactory().load(...).newConnection();
Most of the times, this involves returning this
in the setters.
I know this might be a personal opinion, but what do you think?
Good idea. NioParams
, introduced in 4.0, already uses a fluent API. This is a breaking change though, so it must be introduced in the next major release, that is 6.0.
Great, thanks!
Hey @acogoluegnes,
I feel like this might be a topic suited for an Open-Source beginner. Would you mind assigning this to me? I'd be eager to work on it.
Greetings, Ennio
Thanks for contributing, @enniokerber. @acogoluegnes perhaps we can ship a small (source-level) backwards compatible like #1038 in 5.18
?
#1038 is not exactly a backward-compatible change: applications or libraries using reflection could depend on the method return type. This is very unlikely though, so I'd say we can backport this to 5.x. Is that OK with you @michaelklishin?