Skip to content

Support passing binding data when invoking via admin endpoint #2955

@paulbatum

Description

@paulbatum

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:

[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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions