Skip to content

Commit

Permalink
allow to publish message without payload
Browse files Browse the repository at this point in the history
  • Loading branch information
GyroGearl00se committed Jul 20, 2024
1 parent c311278 commit b6c2b38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Services/SolacePublishService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit b6c2b38

Please sign in to comment.