Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Handling BrokeredMessage Message body with try/catch logic, isn't there a better way?

$
0
0

When i started using the REST API to send Brokered Messages I noticed that i was not able to parse the message body, kept receiving errors. I reviewed Abhishek's blog post below and it did the trick.

http://abhishekrlal.com/2012/03/30/formatting-the-content-for-service-bus-messages/

But as i want my topic to be cross platform, i really don't know what protocol is being used to send messages.

i have resorted to doing try/catch logic starting with the most prominent type of message body first and then going down the chain. This is of course very inefficient and was curious if there is a better way to check what format the body is in before trying to Get it.

thanks.


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>