You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by oa...@apache.org on 2019/11/29 12:50:52 UTC
[camel] branch camel-3.0.x updated: CAMEL-14221: Stomp Component
has no option to set version
This is an automated email from the ASF dual-hosted git repository.
oalsafi pushed a commit to branch camel-3.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.0.x by this push:
new f16cb44 CAMEL-14221: Stomp Component has no option to set version
f16cb44 is described below
commit f16cb44a10305cfc90a7bac40b7803d130eea7c7
Author: onlybytes <on...@gmail.com>
AuthorDate: Fri Nov 29 15:07:40 2019 +0530
CAMEL-14221: Stomp Component has no option to set version
---
.../apache/camel/component/stomp/StompConfiguration.java | 13 +++++++++++++
.../org/apache/camel/component/stomp/StompEndpoint.java | 3 +++
2 files changed, 16 insertions(+)
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
index 392fa2c..e6ae895 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
@@ -35,6 +35,8 @@ public class StompConfiguration implements Cloneable {
private String host;
@UriParam(label = "security")
private SSLContextParameters sslContextParameters;
+ @UriParam
+ private String version;
/**
* Returns a copy of this configuration
@@ -103,4 +105,15 @@ public class StompConfiguration implements Cloneable {
this.sslContextParameters = sslContextParameters;
}
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * The STOMP Version
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
}
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
index 6d61c95..747ff3e9 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
@@ -98,6 +98,9 @@ public class StompEndpoint extends DefaultEndpoint implements AsyncEndpoint, Hea
if (configuration.getSslContextParameters() != null) {
stomp.setSslContext(configuration.getSslContextParameters().createSSLContext(getCamelContext()));
}
+ if (configuration.getVersion() != null && !configuration.getVersion().isEmpty()) {
+ stomp.setVersion(configuration.getVersion());
+ }
stomp.connectCallback(promise);
if (configuration.getHost() != null && !configuration.getHost().isEmpty()) {
stomp.setHost(configuration.getHost());