Skip to content

Instantly share code, notes, and snippets.

@thiagoloureiro
Created October 20, 2017 02:44
Show Gist options
  • Save thiagoloureiro/7330da440a8be0298de4d4ffe1afebb2 to your computer and use it in GitHub Desktop.
Save thiagoloureiro/7330da440a8be0298de4d4ffe1afebb2 to your computer and use it in GitHub Desktop.
public bool WriteMessageOnQueue(string message, string queueName, IConnection connection)
{
using (var channel = connection.CreateModel())
{
channel.BasicPublish(string.Empty, queueName, null, Encoding.ASCII.GetBytes(message));
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment