Force lowercase name for Azure Service Bus Queue
Azure Service Bus Queue names are case-insensitive. When one is
created it will always be forced to lowercase. If a queue with a
non-lowercase is provided, it will be created but can never be
matched causing the next Init to fail.
@@ -8,6 +8,7 @@ package servicebusqueues
import (
"context"
"encoding/json"
+ "strings"
"time"
servicebus "github.com/Azure/azure-service-bus-go"
@@ -130,6 +131,9 @@ func (a *AzureServiceBusQueues) parseMetadata(metadata bindings.Metadata) (*serv
m.ttl = ttl
+ // Queue names are case-insensitive and are forced to lowercase. This mimics the Azure portal's behavior.
+ m.QueueName = strings.ToLower(m.QueueName)
+
return &m, nil
}
