Azure / Azure/azure-functions-host

INameResolver doesn't work for durable isolated function (.Net 8)

Open
#10,270 8 comments 1 reaction 0 assignees View on GitHub
Needs: Attention :wave:
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

### Description
I want to be able to get a ServiceBus trigger name with the INameResolver. And have my own implementation

### Expected behavior
To resolve the name with the name resolver I implemented.

### Actual behavior
Another name resolver is selected, not the one I implemented

### Relevant source code snippets
```
using Microsoft.Azure.WebJobs;

public class CustomNameResolver : INameResolver
{
public string Resolve(string name)
{
// Add logic to resolve the name dynamically.
return name switch
{
"ServiceBusQueue1" => "my-first-servicebus-queue",
"ServiceBusQueue2" => "my-second-servicebus-queue",
_ => throw new ArgumentException($"Unknown queue name: {name}")
};
}
}
```

### Known workarounds
I can only use **environment** settings in the current name resolver. But not my own implementation.

### App Details
c#
![image](https://github.com/Azure/azure-functions-durable-extension/assets/2751684/60dfe5ba-f81a-4670-a49a-f8d70e61bd2a)

Contributor guide

Open the contributing guide

Research direction

Reproduce the .NET 8 durable isolated function case with the custom INameResolver and ServiceBus trigger described in the issue. No repository file or test is identified; done means the implemented resolver is selected instead of the alternate resolver and the trigger name resolves to the returned queue name.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.