You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got two functions (with different input bindings) both for RabbitMQ and Azure Service Bus, and I aim to enable/disable the bindings based on where the function is deployed, e.g.:
When the function is deployed in production on consumption plan, disable RabbitMQ trigger and enable Azure Service Bus
When testing locally, enable RabbitMQ and disable ASB
When on Premium plan, enable both.
The issue is that it seems impossible to disable the RabbitMQ input trigger since the RabbitMQ.Client is created before the function enabled state is checked.
Tried with:
Using [Disable] attribute
Putting AzureWebJob.FUNCTION_NAME.Disabled settings to "true"
Putting a fake connection string pointing to localhost
But the result is the same:
The 'HandleEventFromRabbitMq' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'HandleEventFromRabbitMq'. RabbitMQ.Client: None of the specified endpoints were reachable. RabbitMQ.Client: One or more errors occurred. (Connection failed). RabbitMQ.Client: Connection failed. System.Private.CoreLib: No connection could be made because the target machine actively refused it. 127.0.0.1:5672.
Is there any workaround?
The text was updated successfully, but these errors were encountered:
I have tried the exact same use case (trying to switch between RabbitMQ for local and Azure Service Bus for hosted deployment) and have found the same issue......Any news on this issue?
I also encountered the same behaviour having the same use-case. Is there a workaround or fix in the pipeline. For now i'm just ignoring the exception being thrown.
Hello!
I've got two functions (with different input bindings) both for RabbitMQ and Azure Service Bus, and I aim to enable/disable the bindings based on where the function is deployed, e.g.:
The issue is that it seems impossible to disable the RabbitMQ input trigger since the RabbitMQ.Client is created before the function enabled state is checked.
Tried with:
[Disable]
attributeAzureWebJob.FUNCTION_NAME.Disabled
settings to"true"
But the result is the same:
Is there any workaround?
The text was updated successfully, but these errors were encountered: