VOL-3734 optimise rpc events to be send to queue and then to kafka from the queue

Change-Id: I5e068722412b6d9526760900d9173aaf51e00946
diff --git a/rw_core/core/device/logical_agent_flow.go b/rw_core/core/device/logical_agent_flow.go
index 6e26e42..46d4ffb 100644
--- a/rw_core/core/device/logical_agent_flow.go
+++ b/rw_core/core/device/logical_agent_flow.go
@@ -200,9 +200,9 @@
 				if deviceRules != nil {
 					context["device-rules"] = deviceRules.String()
 				}
-				go agent.ldeviceMgr.SendRPCEvent(ctx,
+				agent.ldeviceMgr.SendRPCEvent(ctx,
 					agent.logicalDeviceID, "failed-to-add-flow", context, "RPC_ERROR_RAISE_EVENT",
-					voltha.EventCategory_COMMUNICATION, nil, time.Now().UnixNano())
+					voltha.EventCategory_COMMUNICATION, nil, time.Now().Unix())
 			}
 		}()
 	}
@@ -360,9 +360,9 @@
 					context["device-rules"] = deviceRules.String()
 				}
 
-				go agent.ldeviceMgr.SendRPCEvent(ctx,
+				agent.ldeviceMgr.SendRPCEvent(ctx,
 					agent.logicalDeviceID, "failed-to-update-device-flows", context, "RPC_ERROR_RAISE_EVENT",
-					voltha.EventCategory_COMMUNICATION, nil, time.Now().UnixNano())
+					voltha.EventCategory_COMMUNICATION, nil, time.Now().Unix())
 				// TODO: Revert the flow deletion
 				// send event, and allow any queued events to be sent as well
 				agent.ldeviceMgr.SendFlowChangeEvent(ctx, agent.logicalDeviceID, res, flowUpdate.Xid, flowUpdate.FlowMod.Cookie)
@@ -456,9 +456,9 @@
 				context["device-rules"] = deviceRules.String()
 			}
 			// Create context and send extra information as part of it.
-			go agent.ldeviceMgr.SendRPCEvent(ctx,
+			agent.ldeviceMgr.SendRPCEvent(ctx,
 				agent.logicalDeviceID, "failed-to-delete-device-flows", context, "RPC_ERROR_RAISE_EVENT",
-				voltha.EventCategory_COMMUNICATION, nil, time.Now().UnixNano())
+				voltha.EventCategory_COMMUNICATION, nil, time.Now().Unix())
 		}
 	}()