🔄 A powerful NuGet package for Azure Functions request resubmission
Easily integrate request resubmission capability into your Azure Functions applications with minimal configuration
This package adds a /resubmit HTTP endpoint to your Azure Functions application, allowing you to programmatically trigger resubmission of failed or pending function executions.
Perfect for implementing retry logic, handling transient failures, or integrating with external monitoring and alerting systems.
Azure Functions can fail. No mattter the retry mechanisms in place. We also might have sensitive apps and we want the ability to resubmit a failed request manually.
We might run different dashboards, workbooks that are showing our apps run status.
With this nuget package you can enrich your monitoring by integrating the /resubmit endpoint to be called directly from your dashboard.
The diagram above shows the basic flow of AzRebit. Here's what happens:
- Install AzRebit - Add the NuGet package to your Azure Function project
- Automatic Integration - AzRebit automatically discovers your functions and registers middleware
- Request Capture - When your function runs, the incoming request is saved to Azure Functions storage
- Resubmit Endpoint - AzRebit exposes a Resubmit HTTP endpoint that can re-trigger any captured function
- Simple Resubmission - Call the endpoint with function name and invocation ID to resubmit any request
The diagram above shows the basic flow of AzRebit. Here's what happens:
- Install AzRebit - Add the NuGet package to your Azure Function project
- Automatic Integration - AzRebit automatically discovers your functions and registers middleware
- Request Capture - When your function runs, the incoming request is saved to Azure Functions storage
- Resubmit Endpoint - AzRebit exposes a Resubmit HTTP endpoint that can re-trigger any captured function
- Simple Resubmission - Call the endpoint with function name and invocation ID to resubmit any request
- Automatic Function Discovery - Automatically discovers and catalogs all functions in your application
- Authentication - Endpoint being added is again an azure function which is using the built-in auth via Function.Key
- Simple HTTP Interface - RESTful endpoint for triggering resubmissions (HTTP, Blob, Queue, Timer)
- Invocation Tracking - Track resubmissions using invocation IDs
- Zero Configuration - Works out of the box with sensible defaults
- .NET 8 or higher
- Azure Functions Worker SDK v1.0 or higher
- Azure Functions isolated worker model
Install the NuGet package:
dotnet add package AzFunctionResubmit
Or via Package Manager Console:
Install-Package AzFunctionResubmit
To configure AzFunctionResubmit configure AddResubmitEndpoint();
using AzFunctionResubmit;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Builder;
var builder = FunctionsApplication.CreateBuilder(args);
builder.ConfigureFunctionsWebApplication();
//just add
builder.AddResubmitEndpoint();
builder.Build().Run();You can configure the resubmit behavior with options:
builder.AddResubmitEndpoint(options =>
{
// Exclude specific functions from resubmit functionality
options.ExcludedFunctionNames.Add("FunctionToSkip");
});You can use this package if your azure function is triggered by:
HttpTrigger--> saves incoming tohttp-resubmitsBlobTrigger--> saves incoming toblob-resubmitsQueueTrigger--> saves incoming toqueue-resubmitsTimerTrigger--> Not yet available - in progressServiceBusTrigger--> > Not available. You should use built-in deadlettering
Every function in your project, with these listed trigger attributes, will have appropriate resubmit functionality.
Since the resubmition is best used just for failed requests, keeping successfull runs might increase storage size. You can delete the saved request within your function by injecting IRebitStoreOperations and calling DeleteResubmitFile() method in case of a successful execution.
//optional - delete the saved request. Usually you would want this if your function runs successfully
public class MyFunction
{
private readonly IRebitStoreOperations _rebitStore;
public MyFunction(IRebitStoreOperations rebitStore)
{
_rebitStore = rebitStore;
}
[Function("MyFunction")]
public async Task Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
{
try
{
// Your function logic here
await ProcessRequest(req);
// If successful, delete the saved request
var invocationId = req.FunctionContext.InvocationId;
await _rebitStore.DeleteResubmitFile(invocationId);
}
catch (Exception)
{
// If failed, keep the saved request for potential resubmission
throw;
}
}
}Additionaly you can setup a Lifecycle Management policy on your storage account to automatically delete blobs older than a certain number of days.
The diagram above illustrates the complete flow of AzRebit. Here's the step-by-step process:
- Function Discovery - On startup, the package automatically scans assemblies and discovers all methods decorated with the
[Function]attribute - Registration - Discovered function names alongside its trigger data are cached for quick lookup
- Middleware - Before your function starts, middleware
IFunctionsWorkerMiddlewarewill be invoked to save the incoming request to Azure Blob Storage and tag it with the unique InvocationId derived from the function context - Storage Organization - Saved requests are organized in blob containers by trigger type (
http-resubmits/,queue-resubmits/,blob-resubmits/,timer-resubmits/) - Resubmit Handling - Incoming requests to
/resubmitare cross-referenced with the triggers we support and accordingly the payload is pulled from its saved location and sent again to the Function's trigger
Making a resubmit request depends on two important query params: functionName and invocationId
functionName --> Name of Azure function as defined inside [Function()]
invocationId -->Each function run has a uniqueId coming from the FunctionContext. That Id is used to tag and locate the payload to resubmit.
To locate what is the unique id of you run you need to inspect your logs and search for InvocationId property. InvocationIdProperty
curl -X POST "http://localhost:7071/api/resubmit?functionName=MyFunction&invocationId=abc-123-def-456" \In case of HTTP triggers the invocationid can be a custom. If you add a header
x-azrebit-invocationidwith a custom value that value will be used as invocationId.
POST /resubmit
| Parameter | Required | Description |
|---|---|---|
functionName |
Yes | Name of the Azure Function to resubmit |
invocationId |
Yes | Unique identifier to fetch the resubmission context |
Resubmit request successfully queued.
{
"message": "Resubmit request queued for function 'MyFunction'",
"functionName": "MyFunction",
"invocationId": "abc-123-def-456",
"timestamp": "2025-01-01T12:00:00Z"
}Missing required query parameters.
{
"error": "Missing required query parameter: functionName"
}Invalid or missing API key.
{
"error": "Unauthorized: Invalid or missing API key"
}Function does not exist in the application.
{
"error": "Function 'MyFunction' not found"
}Server error occurred while processing the request.
{
"error": "Internal server error"
}For now I am not accepting contributions.
This project is licensed under the MIT License - see the LICENSE file for details.
The package is not yet fully tested on production. If you notice any issues feel free to open one. For issues, feature requests, or questions, please open an issue on GitHub.

