summaryrefslogtreecommitdiffstats
path: root/feature-simulators/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'feature-simulators/src/main')
-rw-r--r--feature-simulators/src/main/java/org/onap/policy/drools/simulators/DMaaPSimulatorJaxRs.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/feature-simulators/src/main/java/org/onap/policy/drools/simulators/DMaaPSimulatorJaxRs.java b/feature-simulators/src/main/java/org/onap/policy/drools/simulators/DMaaPSimulatorJaxRs.java
index 8b653aae..dd0fb7b8 100644
--- a/feature-simulators/src/main/java/org/onap/policy/drools/simulators/DMaaPSimulatorJaxRs.java
+++ b/feature-simulators/src/main/java/org/onap/policy/drools/simulators/DMaaPSimulatorJaxRs.java
@@ -99,7 +99,7 @@ public class DMaaPSimulatorJaxRs {
return response;
}
- private String waitForNextMessageFromQueue(int timeout, String topicName) {
+ protected String waitForNextMessageFromQueue(int timeout, String topicName) {
try {
sleep(timeout);
if (queues.containsKey(topicName)) {
@@ -129,10 +129,7 @@ public class DMaaPSimulatorJaxRs {
@Consumes(MediaType.TEXT_PLAIN)
public String publish(@PathParam("topicName") String topicName, String body) {
BlockingQueue<String> queue = queues.computeIfAbsent(topicName, entry -> new LinkedBlockingQueue<>());
-
- if (!queue.offer(body)) {
- logger.warn("error on topic {}, failed to place body {} on queue", topicName, body);
- }
+ queue.offer(body);
return "";
}