zhfeng commented on code in PR #3731:
URL: https://github.com/apache/camel-quarkus/pull/3731#discussion_r850953873
##########
integration-tests/paho-mqtt5/src/main/java/org/apache/camel/quarkus/component/paho/mqtt5/it/PahoMqtt5Resource.java:
##########
@@ -68,13 +70,17 @@ public class PahoMqtt5Resource {
public String consumePahoMessage(
@PathParam("protocol") String protocol,
@PathParam("queueName") String queueName) {
+ String tmpKeystore = null;
+
if ("ssl".equals(protocol)) {
- setKeyStore(keystore, password);
+ tmpKeystore = setKeyStore(keystore, password);
}
+
String result = consumerTemplate.receiveBody("paho-mqtt5:" + queueName
+ "?brokerUrl=" + brokerUrl(protocol), 5000,
String.class);
- if ("ssl".equals(protocol)) {
- removeKeyStore(keystore);
+
+ if ("ssl".equals(protocol) && tmpKeystore != null) {
+ removeKeyStore(tmpKeystore);
Review Comment:
Thanks a lot @ppalaga! I revisit the
[paho-mqtt5-component.sslClientProps](https://camel.apache.org/components/3.14.x/paho-mqtt5-component.html#_component_option_sslClientProps)
and it seems that we can pass them with ```com.ibm.ssl.keyStore``` and
```com.ibm.ssl.keyStorePassword``` in uri. It should be better to avoid setting
```javax.net.ssl.*``` system properties. I will try it at first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]