summaryrefslogtreecommitdiffstats
path: root/appc-client/client-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'appc-client/client-lib/src')
-rw-r--r--appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java8
-rw-r--r--appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java8
2 files changed, 16 insertions, 0 deletions
diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java
index 913f80f44..8fc678828 100644
--- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java
+++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java
@@ -105,6 +105,14 @@ class ConsumerImpl implements Consumer {
builder.usingHosts(hosts).onTopic(topic).knownAs(group, groupId);
builder.withSocketTimeout(timeout + 5000).waitAtServer(timeout);
builder.receivingAtMost(DEFAULT_LIMIT);
+
+ //added for loop for defect 354330
+ for (String url : hosts) {
+ if (url.contains("3905") || url.contains("https")) {
+ builder.usingHttps(true);
+ break;
+ }
+ }
// Add credentials if provided
if (authKey != null && authSecret != null) {
diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java
index 7729db98d..b979c9d48 100644
--- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java
+++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java
@@ -62,6 +62,14 @@ class ProducerImpl implements Producer {
private CambriaBatchingPublisher getProducer() throws MalformedURLException, GeneralSecurityException {
PublisherBuilder builder = new PublisherBuilder().usingHosts(hosts);
+
+ //added for loop for defect 354330
+ for (String url : hosts) {
+ if (url.contains("3905") || url.contains("https")) {
+ builder.usingHttps(true);
+ break;
+ }
+ }
// Add credentials if provided
if (authKey != null && authSecret != null) {