-
Bug
-
Resolution: Done
-
Normal
-
None
-
2.11.0.GA
-
None
-
False
-
False
-
In the code below, connClientId is taken from client configuration. It may be explicitly set, or it may be unset, i.e. null. I want to create ProtonJ2 client and use the client id when it was specified.
The following does not work. When connClientId is null, I get exception from ProtonJ2 that the parameter may not be null.
ClientOptions clientOptions = new ClientOptions(); if (connClientId != null) { clientOptions.id(connClientId); } Client client = Client.create(clientOptions);
Objects.requireNonNull(options.id(), "User supplied container Id must be non-null");
This is slightly inconvenient. Furthermore, it means that I am not able to set other client options (besides the id) and have ProtonJ2 generate a random ID for me. As far as I can tell, there is no recommendation for suitable method for generating random ID myself.
- links to
-
RHSA-2022:105520 AMQ Clients 2023.Q4