From 2acd02bc20885c1f26539b30b27625cbef39ef84 Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Tue, 24 Apr 2018 21:59:48 -0700 Subject: Possible fix for event listener Change-Id: Ie2eaf7f3d02bdd0b8adae964d3abf905781f996f Signed-off-by: Patrick Brady Issue-ID: APPC-859 --- .../adapter/factory/DmaapMessageAdapterFactoryImpl.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src') diff --git a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java index 5fe2d0391..85110f2f2 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java +++ b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java @@ -30,25 +30,29 @@ import java.util.Set; import org.onap.appc.adapter.message.Consumer; import org.onap.appc.adapter.message.MessageAdapterFactory; import org.onap.appc.adapter.message.Producer; -import org.onap.appc.adapter.messaging.dmaap.impl.DmaapConsumerImpl; -import org.onap.appc.adapter.messaging.dmaap.impl.DmaapProducerImpl; +import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapConsumerImpl; +import org.onap.appc.adapter.messaging.dmaap.http.HttpDmaapProducerImpl; public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory { @Override public Producer createProducer(Collection pools, String writeTopic, String apiKey, String apiSecret) { - return new DmaapProducerImpl(pools, writeTopic,apiKey, apiSecret); + return new HttpDmaapProducerImpl(pools, writeTopic); } @Override public Producer createProducer(Collection pools, Set writeTopics, String apiKey, String apiSecret) { - return new DmaapProducerImpl(pools, writeTopics, apiKey, apiSecret); + String topic = ""; + for(String s : writeTopics){ + topic = s; + } + return new HttpDmaapProducerImpl(pools,topic); } @Override public Consumer createConsumer(Collection pool, String readTopic, String clientName, String clientId, String filterJson, String apiKey, String apiSecret) { - return new DmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filterJson); + return new HttpDmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filterJson); } } -- cgit 1.2.3-korg