码迷,mamicode.com
首页 > Web开发 > 详细

Azure ServiceBus的消息中带有@strin3http//schemas.microsoft.com/2003/10/Serialization/?

时间:2017-02-19 00:26:04      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:opera   style   如何   erro   code   对象   stream   原因   序列   

今天碰到一个很讨厌的问题,使用nodejs 接收Azure service bus队列消息的时候,出现了:@strin3http//schemas.microsoft.com/2003/10/Serialization/?

 

如何产生的:

使用 C# 往队列中插入消息,使用 nodejs 读取消息。

 

出现乱码的原因:

写入消息使用AMQP对象进行序列化,读取的时候使用http进行传输。

 

解决办法:

写入的时候改用 stream 的方式写入而不是直接写入字符串。

 

//接收队列消息。
var serviceBusService = azure.createServiceBusService("...");

serviceBusService.receiveQueueMessage(‘1001‘, function (error, m) {
    console.log(m);
}

技术分享

 

stackoverflow 的个回答:

http://stackoverflow.com/questions/36307767/how-to-remove-strin3http-schemas-microsoft-com-2003-10-serialization-receive

http://stackoverflow.com/questions/33542509/interoperability-azure-service-bus-message-queue-messages

 

Azure ServiceBus的消息中带有@strin3http//schemas.microsoft.com/2003/10/Serialization/?

标签:opera   style   如何   erro   code   对象   stream   原因   序列   

原文地址:http://www.cnblogs.com/easeyeah/p/6414528.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!