Providing Service Bus UserProperties when debugging locally in VS
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
When developing Azure Functions locally with a Service Bus binding, it is possible to send a request to test the function using an HTTP request to `http://localhost:{port}/admin/functions/{function_name}`
(see Non HTTP triggered functions at https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local).
In the body of the HTTP request, the following is able to be sent to populate the body of the service bus message:
{
"input": ""
}
which gets bound to the message.Body property in the method:
eg
public class TestServiceBusTrigger
{
[FunctionName("test-servicebus-trigger")]
public static void ProcessQueueMessage([ServiceBusTrigger("inputqueue")] Message message, TextWriter logger)
{
logger.WriteLine(message.Body);
}
}
How do you populate the `message.UserProperties` in the sample request.
Currently using the following versions:
- Microsoft.Azure.WebJobs **3.0.0-beta5**
- Microsoft.Azure.WebJobs.ServiceBus **3.0.0-beta5**
- Microsoft.NET.Sdk.Functions **1.0.13**
- Azure Functions Core Tools **2.0.1-beta.31**
- Function Runtime Version: **2.0.11888.0**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.