Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.8.0
-
None
-
Unknown
Description
The current code in NatsConfiguration.java adds the nats:// -prefix automatically to the server connection string:
String prefix = "nats://";
This causes issues, because NATS supports other protocols like Websockets, where the prefix is ws:// or wss:// instead of nats://
Looking at the examples provided by NATS, the prefix is something that the user of the NATS should provide as it defines the protocol between the client and the server. For example: https://natsbyexample.com/examples/messaging/pub-sub/java
I was wondering if the auto-prefixing could be removed but then that would be a breaking change.
Maybe a new configuration parameter could be added for defining the prefix (the protocol) and that could default to nats:// like currently?