Setup workflow with built-in ServiceBus trigger "When messages are available in a queue (peek-lock)"
Add any action (eg. Compose)
Add built-in ServiceBus action "Complete the message action"
Add a new item to the queue the trigger is listening to.
When running the workflow, the message with messageId SOMETIMES (50/50 chance) not complete as result of a bad request
"code": "ServiceProviderActionFailed",
"message": "The service provider action failed with error code 'ServiceOperationFailed' and error message 'The Service Bus receiver was not found to perform operation 'completeMessage' on message id '5115677d-c322-4c35-b377-524490118728'.'.```
After the lock release a new run is triggered. This run the message is might still not be completed successfully, or is succesfully completed.
### What type of Logic App Is this happening in?
Standard (Portal)
### Are you using Preview Designer or GA Designer
Generally Available
### Workflow JSON
```json
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Complete_the_message": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"messageId": "@item()?['messageId']"
},
"serviceProviderConfiguration": {
"connectionName": "servicebus",
"operationId": "completeMessage",
"serviceProviderId": "/serviceProviders/serviceBus"
}
},
"runAfter": {
"Compose": [
"SUCCEEDED"
]
}
},
"Compose": {
"type": "Compose",
"inputs": "@triggerBody()?['contentData']",
"runAfter": {}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"When_messages_are_available_in_a_queue_(peek-lock)": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"queueName": "@parameters('myworkflow').queueName"
},
"serviceProviderConfiguration": {
"connectionName": "serviceBus",
"operationId": "peekLockQueueMessages",
"serviceProviderId": "/serviceProviders/serviceBus"
}
},
"splitOn": "@triggerOutputs()?['body']"
}
}
},
"kind": "Stateful"
}
Describe the Bug with repro steps
Add a new item to the queue the trigger is listening to. When running the workflow, the message with messageId SOMETIMES (50/50 chance) not complete as result of a bad request
Screenshots or Videos
Browser
Edge
Additional context
No response