I'm using Microsoft.Azure.ServiceBus 2.0.0 to subscribe for queue messages, and get unexpected characters when I use Encoding.UTF8.GetString(serviceBusMessage.Body)
.
It looks like the message content should have been valid XML, but its certainly not.
The code that sends messages, uses the old WindowsAzure.ServiceBus 4.1.6 library, and looks like this:
private void SendToProcessingQueue(Guid accountId, Message msg)
{
string queueName = msg.MessageType.ToLower();
var client = CreateQueueClient(queueName);
client.Send(new BrokeredMessage(new MessageHint()
{
AccountId = accountId,
MessageId = msg.Id,
MessageType = msg.MessageType
}));
}
Are the new and old libraries incompatible?