aboutsummaryrefslogtreecommitdiffstats
path: root/feature-pooling-dmaap/src/main/java/org
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-05-09 17:06:59 -0400
committerJim Hahn <jrh3@att.com>2018-05-09 17:06:59 -0400
commit49e77b6405ef7d286bdd667f2a689b20022351fc (patch)
treebbb18d8999f348046b0e49137d3f2a8ad4273e07 /feature-pooling-dmaap/src/main/java/org
parent9e77037eb13279a69a38dd78f400365f16e220c1 (diff)
Discard Forward to wrong host
Changed to discard Forward message if the channel does not match the host that received it. Change-Id: I9235bd3b0c5eb264f9b1cfe53552fadf66a0edc2 Issue-ID: POLICY-787 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-pooling-dmaap/src/main/java/org')
-rw-r--r--feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/State.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/State.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/State.java
index 545c2ef0..fcb0e139 100644
--- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/State.java
+++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/state/State.java
@@ -147,6 +147,11 @@ public abstract class State {
* @return the new state, or {@code null} if the state is unchanged
*/
public State process(Forward msg) {
+ if(!getHost().equals(msg.getChannel())) {
+ logger.info("discard Forward message to {} from {} on topic {}", msg.getChannel(), msg.getSource(), getTopic());
+ return null;
+ }
+
logger.info("received Forward message from {} on topic {}", msg.getSource(), getTopic());
mgr.handle(msg);
return null;