0
votes

i am using azure service bus queue. but i am not able to get all message from queue using "get all queue message (peek Lock): Microsoft built in api.

Is there any way to get all queue messages?

{ "$connections": { "value": { "servicebus_1": { "connectionId": "/subscriptions/c776fec3-6aec-4722-b099-b054c267b240/resourceGroups/Plugin-Resource/providers/Microsoft.Web/connections/servicebus-3", "connectionName": "servicebus-3", "id": "-b054c267b240/providers/Microsoft.Web/locations/northcentralus/managedApis/servicebus" } } }, "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "Get_messages_from_a_queue_(peek-lock)": { "inputs": { "host": { "api": { "runtimeUrl": "https://logic-apis-northcentralus.azure-apim.net/apim/servicebus" }, "connection": { "name": "@parameters('$connections')['servicebus_1']['connectionId']" } }, "method": "get", "path": "/@{encodeURIComponent('email-listener')}/messages/batch/peek", "queries": { "maxMessageCount": 20, "queueType": "Main" } }, "runAfter": {}, "type": "ApiConnection" } }, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": { "$connections": { "defaultValue": {}, "type": "Object" } }, "triggers": { "Recurrence": { "recurrence": { "frequency": "Day", "interval": 3 }, "type": "Recurrence" } } } }

thanks

1
Please share the code.Gaurav Mantri
i am using azure logic appHumna Zaidi

1 Answers

0
votes

The managed API by default returns 20 messages. enter image description here

You'll need to manually increase the max message count if you have more than 20 messages in your queue.

enter image description here