Azure / Azure/azure-functions-host

Support passing binding data when invoking via admin endpoint

Open
#2,955 10 comments 7 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

This stack overflow post highlights a scenario where using the admin endpoint for testing is awkward because the function was written to accept additional binding parameters such as "deliveryCount" and there is no way to pass that when invoking the function via HTTP.

https://stackoverflow.com/questions/50725773/servicebustrigger-with-enqueuetimeutc-argument-fails-when-triggered-via-http-end

Here's the example function:

```csharp
[FunctionName("ServiceBusQueueTriggerCSharp")]
public static void Run(
[ServiceBusTrigger("myqueue", AccessRights.Manage, Connection = "ServiceBusConnection")]
string myQueueItem,
Int32 deliveryCount, // this fails
DateTime enqueuedTimeUtc, // this fails too
string messageId,
TraceWriter log)
{
log.Info($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
log.Info($"EnqueuedTimeUtc={enqueuedTimeUtc}");
log.Info($"DeliveryCount={deliveryCount}");
log.Info($"MessageId={messageId}");
}
```

This issue tracks adding the ability to specify the additional binding data via query parameters as this seems like the most natural way to pass in additional data.

Contributor guide

Open the contributing guide

Research direction

Start at the admin endpoint invocation path and trace how query parameters and binding data are currently handled. Define the query-parameter behavior for additional binding values, then verify that the Service Bus example can receive deliveryCount, enqueuedTimeUtc, and messageId when invoked through the admin endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.