Skip to content

Commit

Permalink
fixed duplicated messages in backend when receiving via websocket
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
  • Loading branch information
thjaeckle committed Dec 18, 2017
1 parent 76d0152 commit 5e9e59c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ public Receive createReceive() {
/* Live Signals */
// publish all those live signals which were issued by this session into the cluster
.match(Signal.class, signal -> isLiveSignal(signal) && wasIssuedByThisSession(signal) &&
(signal instanceof MessageCommand || signal instanceof MessageCommandResponse),
(signal instanceof MessageCommand),
signal -> logger.debug("Don't publishing message again - was already published: <{}>", signal)
)
.match(Signal.class, signal -> isLiveSignal(signal) && wasIssuedByThisSession(signal) &&
(signal instanceof MessageCommandResponse),
publishLiveSignal(StreamingType.MESSAGES.getDistributedPubSubTopic())
)
.match(Signal.class, signal -> isLiveSignal(signal) && wasIssuedByThisSession(signal) &&
Expand Down

0 comments on commit 5e9e59c

Please sign in to comment.