Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Logic App service bus message content

I have logic app that is triggered by a service bus. The message content is not usable as it is just random characters. I suspect that perhaps it needs to be parsed but it is not clear how to do this.

I have the following: Not enough reputation to add an image - but screen shot from Azure

 "Insert_Entity": {
            "inputs": {
                "body": {
                    "PartitionKey": "deviceID",
                    "RowKey": "@variables('curDate')",
                    "content": "@triggerBody()?['ContentData']"
                },

When I look at the data that I am getting for the "content" coming from the "@triggerBody()?['ContentData']" it looks like this:

"W3sidHlwZSI6ImxvZyJ9LF...." I deleted most of this as it 100's of characters long.

I suspect that this needs to be parsed or something to look at the actual message body. I have checked this out but don't know where to insert code like this: Getting content from service bus in logic apps

Can you please explain how to see the message body.

like image 208
mg360 Avatar asked Nov 20 '17 19:11

mg360


People also ask

How do I read my Azure Service Bus messages?

To peek messages with advanced options, select Peek Mode in the Service Bus Explorer dropdown. Check the metrics to see if there are Active Messages or Dead-lettered Messages to peek and select either Queue / Subscription or DeadLetter sub-queue. Select the Peek with options button.

Does Azure Service Bus store messages?

You could use the Azure Service Bus auto-forwarding feature to send all those messages from various their respective catch-all subscriptions to a single queue and listen to that queue. Using Functions or Logic Apps you would be able to respond to those messages and store their information in any datastore you'd like.


1 Answers

Can you please explain how to see the message body.

The string W3sidHlwZSI6ImxvZyJ9LF.... you mentioned is base64string. If we want to see the message body we need to convert the base64string to string

We could do that with base64ToString(triggerBody()?['ContentData']) details please refer to the screenshot.

enter image description here

Body info:

enter image description here

like image 198
Tom Sun - MSFT Avatar answered Nov 13 '22 05:11

Tom Sun - MSFT