Mikael Koskinen created CAMEL-21311:
---------------------------------------
Summary: NATS: Automatically added nats:// prefix in
servers-parameter blocks the usage of NATS' built-in Websocket support
Key: CAMEL-21311
URL: https://issues.apache.org/jira/browse/CAMEL-21311
Project: Camel
Issue Type: Improvement
Components: camel-nats
Affects Versions: 4.8.0
Reporter: Mikael Koskinen
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?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)