diff --git a/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java b/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java
index 12d3b62..909bbbb 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/Highlights.java
@@ -16,6 +16,8 @@
 
 package org.onosproject.ui.topo;
 
+import com.google.common.base.Preconditions;
+
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -34,6 +36,7 @@
     private static final String MIN = "min";
     private static final String MAX = "max";
 
+
     /**
      * A notion of amount.
      */
@@ -43,6 +46,7 @@
         MAXIMALLY(MAX);
 
         private final String s;
+
         Amount(String str) {
             s = str;
         }
@@ -58,7 +62,30 @@
     private final Map<String, LinkHighlight> links = new HashMap<>();
 
     private Amount subdueLevel = Amount.ZERO;
+    private int delayMs = 0;
 
+    //TODO: Think of a better solution for topology events race conditions
+    /**
+     * Sets the number of milliseconds to delay processing of highlights
+     * events on the client side.
+     *
+     * @param ms milliseconds to delay
+     * @return self, for chaining
+     */
+    public Highlights delay(int ms) {
+        Preconditions.checkArgument(ms >= 0, "Delay cannot be lower than 0");
+        delayMs = ms;
+        return this;
+    }
+
+    /**
+     * Return the delay for the highlight event.
+     *
+     * @return delay in milliseconds
+     */
+    public int delayMs() {
+        return delayMs;
+    }
 
     /**
      * Adds highlighting information for a device.
@@ -186,4 +213,5 @@
     public LinkHighlight getLink(String id) {
         return links.get(id);
     }
+
 }
diff --git a/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java b/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java
index efe69f5..bd07d6c 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/TopoJson.java
@@ -33,6 +33,7 @@
     static final String HOSTS = "hosts";
     static final String LINKS = "links";
     static final String SUBDUE = "subdue";
+    static final String DELAY = "delay";
 
     static final String ID = "id";
     static final String LABEL = "label";
@@ -99,6 +100,10 @@
         if (!toSubdue.equals(Highlights.Amount.ZERO)) {
             payload.put(SUBDUE, toSubdue.toString());
         }
+        int delay = highlights.delayMs();
+        if (delay > 0) {
+            payload.put(DELAY, delay);
+        }
         return payload;
     }
 
diff --git a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
index fb7921a..d8a0454 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
@@ -30,7 +30,7 @@
     var tos = 'TopoOverlayService: ';
 
     // injected refs
-    var $log, fs, gs, wss, ns, tss, tps, api;
+    var $log, $timeout, fs, gs, wss, ns, tss, tps, api;
 
     // internal state
     var overlays = {},
@@ -280,7 +280,20 @@
         tss = _tss_;
     }
 
+    //process highlight event with optional delay
     function showHighlights(data) {
+        function doHighlight() {
+            _showHighlights(data);
+        }
+
+        if (data.delay) {
+            $timeout(doHighlight, data.delay);
+        } else {
+            doHighlight();
+        }
+    }
+
+    function _showHighlights(data) {
         var less;
 
         /*
@@ -341,7 +354,6 @@
             var ldata = api.findLinkById(link.id),
                 lab = link.label,
                 units, portcls, magnitude;
-
             if (ldata && !ldata.el.empty()) {
                 if (!link.subdue) {
                     api.unsupLink(ldata.key, less);
@@ -375,11 +387,12 @@
 
     angular.module('ovTopo')
     .factory('TopoOverlayService',
-        ['$log', 'FnService', 'GlyphService', 'WebSocketService', 'NavService',
-            'TopoPanelService',
+        ['$log', '$timeout', 'FnService', 'GlyphService', 'WebSocketService',
+            'NavService', 'TopoPanelService',
 
-        function (_$log_, _fs_, _gs_, _wss_, _ns_, _tps_) {
+        function (_$log_, _$timeout_, _fs_, _gs_, _wss_, _ns_, _tps_) {
             $log = _$log_;
+            $timeout = _$timeout_;
             fs = _fs_;
             gs = _gs_;
             wss = _wss_;
