/// <summary> /// Send a EventMessage message /// invio importantissimo perche spedisce eventi e oggetti in array bytela dimensione e strategica /// </summary> /// <param name="message"></param> public void SendMessage(SkeletonMessage message) { try { byte[] byteArrayBytes = SkeletonMessage.SerializeMessage(message); EventData evtData = new EventData(byteArrayBytes); eventHubClient.Send(evtData); } catch (Exception ex) { LogEngine.TraceError($"Error in {MethodBase.GetCurrentMethod().Name} - Error {ex.Message}"); } }
/// <summary> /// Send a EventMessage message /// invio importantissimo perche spedisce eventi e oggetti in array bytela dimensione e strategica /// </summary> /// <param name="message"></param> public void SendMessage(SkeletonMessage message) { try { byte[] byteArrayBytes = SkeletonMessage.SerializeMessage(message); EventData evtData = new EventData(byteArrayBytes); eventHubClient.Send(evtData); } catch (Exception ex) { LogEngine.WriteLog( Configuration.EngineName, $"Error in {MethodBase.GetCurrentMethod().Name}", Constant.DefconOne, Constant.TaskCategoriesEventHubs, ex, EventLogEntryType.Error); } }
public void SendMessage(SkeletonMessage message) { byte[] byteArrayBytes = SkeletonMessage.SerializeMessage(message); this.subscriber.Publish("*", byteArrayBytes); }