/// <summary> /// Publishes a message /// </summary> /// <param name="message"></param> public void PublishMessage(Message message) { if (!ResetConnection()) { return; } try { m_publishingServiceChannel.Publish(message); Logger.Log(string.Format("{0} was published ", message.GetType().Name, LogLevel.Verbose, new Dictionary <string, object>() { { "RequestName", message.RequestName }, { "RequestID", message.RequestID } })); } catch { //Logger.Log("Error publishing a message", LogLevel.Warning, new Dictionary<string, object>() { { "Exception", ex } }); if (m_retry) { try { m_publishingServiceChannel.Publish(message); } catch (Exception iex) { Logger.Log("Error publishing a message", LogLevel.Warning, new Dictionary <string, object>() { { "Exception", iex } }); } } } }