-
Notifications
You must be signed in to change notification settings - Fork 582
property file-based initialization #324
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
Comments
This can work for a limited number of (common) settings. I'm not sure what can be done about e.g. collections — should command separated lines be used? And some values, e.g. a @acogoluegnes WDYT? |
@michaelklishin Seems to me like a good idea. Like you said, we won't be able to support all the options (e.g. |
+1 for this, this would be very useful |
I will try to verify this in the next days. |
I did a quick test with 4.4.0-SNAPSHOT as of today. I replaced following working code:
by
Now I am getting:
I did not do any further analysis so far. Any idea? |
Please ignore previous comment. I did not see that there was a default prefix. Now, when setting |
@rrrrrrrrramba see the Networking guide. The best way to diagnose this kind of feature is to fire up a VisualVM or a debugger in your IDE and inspect |
@michaelklishin I wasn't providing an uri, see previous comment. So it was probably falling back to some default credentials, which aren't allowed on my host (standard 3.6.x Docker image). |
@acogoluegnes FYI, I finished my tests, based on commit |
Will this also be merged in the 5.x master branch? |
All 4.x changes that can go into 5.x, will. |
Great! |
This is a feature request for the RabbitMQ Java library.
It would be useful if we could initialize the
ConnectionFactory
via a properties file. Now, whenever we want to set a new configuration property, we have to change the code to call the setter. It would be more convenient if we just could alter the properties file.You could take Hikari as an example, see https://github.com/brettwooldridge/HikariCP#initialization. A java.util.properties file can be provided. Whenever we want to alter the configuration, we just update the properties file, without being forced to alter the code.
The text was updated successfully, but these errors were encountered: