diff options
author | Jim Hahn <jrh3@att.com> | 2020-06-02 09:55:34 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-06-02 09:56:13 -0400 |
commit | b3b8c72936adbc82f6ae4377f6c18dcaa30e4dc0 (patch) | |
tree | b32898098d63d5070a1962b07c0b8691ecc67ef1 /policy-endpoints/src/main/java/org | |
parent | 904ea907e0a31005eeb2118bb9269ed5ba60e3b7 (diff) |
Code changes for dmaap-client upgrade
Issue-ID: POLICY-1996
Change-Id: Id8a3acf9406c6acada4c3ffee679f2baf819cded
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/main/java/org')
-rw-r--r-- | policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java index 0f31bf7d..233434f1 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java @@ -35,6 +35,7 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.lang3.StringUtils; import org.onap.dmaap.mr.client.MRClientFactory; import org.onap.dmaap.mr.client.impl.MRConsumerImpl; +import org.onap.dmaap.mr.client.impl.MRConsumerImpl.MRConsumerImplBuilder; import org.onap.dmaap.mr.client.response.MRConsumerResponse; import org.onap.dmaap.mr.test.clients.ProtocolTypeConstants; import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties; @@ -302,10 +303,16 @@ public interface BusConsumer { throw new IllegalArgumentException("No topic for DMaaP"); } - this.consumer = new MRConsumerImpl(busTopicParams.getServers(), busTopicParams.getTopic(), - busTopicParams.getConsumerGroup(), busTopicParams.getConsumerInstance(), - busTopicParams.getFetchTimeout(), busTopicParams.getFetchLimit(), null, - busTopicParams.getApiKey(), busTopicParams.getApiSecret()); + this.consumer = new MRConsumerImplBuilder() + .setHostPart(busTopicParams.getServers()) + .setTopic(busTopicParams.getTopic()) + .setConsumerGroup(busTopicParams.getConsumerGroup()) + .setConsumerId(busTopicParams.getConsumerInstance()) + .setTimeoutMs(busTopicParams.getFetchTimeout()) + .setLimit(busTopicParams.getFetchLimit()) + .setApiKey(busTopicParams.getApiKey()) + .setApiSecret(busTopicParams.getApiSecret()) + .createMRConsumerImpl(); this.consumer.setUsername(busTopicParams.getUserName()); this.consumer.setPassword(busTopicParams.getPassword()); |