diff --git a/Services/SolacePublishService.cs b/Services/SolacePublishService.cs index da0d34f..53a6ae3 100644 --- a/Services/SolacePublishService.cs +++ b/Services/SolacePublishService.cs @@ -50,7 +50,10 @@ public void PublishMessage(string host, string vpnName, string username, string using (IMessage msg = ContextFactory.Instance.CreateMessage()) { msg.Destination = ContextFactory.Instance.CreateTopic(topic); - msg.BinaryAttachment = Encoding.UTF8.GetBytes(message); + if (!String.IsNullOrEmpty(message)) + { + msg.BinaryAttachment = Encoding.UTF8.GetBytes(message); + } _session.Send(msg); } }