Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

INameResolver for Queue Trigger in Azure Function V4

Open ranouf opened this issue 4 years ago • 9 comments

Hi,

I would like to use the INameResolver for queue trigger like it's available in Azure WebJob. I know it was not available in the past, but is it plan to add for Azure Function V4? Is there a workaround to be able to use it?

here is the code used for Azure WebJob:

public class TriggerNameResolver : INameResolver
 {
     private readonly IConfiguration _configuration;
     private readonly MessagerSettings _messagerSettings;

     public TriggerNameResolver(
         IConfiguration configuration,
         IOptions<MessagerSettings> messagerSettings
     )
     {
         _configuration = configuration;
         _messagerSettings = messagerSettings.Value;
     }

     public string Resolve(string name)
     {
         if (name.Contains(':'))
         {
             return _configuration[name].ToString();
         }
         return (_messagerSettings.QueueName + name).ToLower();
     }
 }

Thanks for your help

ranouf avatar Jan 13 '22 22:01 ranouf

Hi @pragnagopa , Can we consider this issue as a feature request

v-bbalaiagar avatar Jan 17 '22 16:01 v-bbalaiagar

Tagging @fabiocav for triage.

pragnagopa avatar Jan 18 '22 22:01 pragnagopa

Yes please, because it doesn't seem to be available. I would like to use IConfiguration with Azure App Service to inject configuration in a more flexible manner.

theo-albers avatar Feb 15 '22 19:02 theo-albers