Created
October 20, 2017 02:45
-
-
Save thiagoloureiro/7aff8a9caf011036dc697fbe7fcd6d92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string RetrieveSingleMessage(string queueName, IConnection connection) | |
{ | |
BasicGetResult data; | |
using (var channel = connection.CreateModel()) | |
{ | |
data = channel.BasicGet(queueName, true); | |
} | |
return data != null ? System.Text.Encoding.UTF8.GetString(data.Body) : null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment