Cannot receive messages for the client scope subscription
We try to use the client-scoped subscription in our product and when we use the Azure service bus explorer to receive messages, it throws an exception. As you see here if the subscription is client scoped subscription as test_article$ClientId$D, it will not allow processing due to sub-queue name being invalid.
<16:10:08> The subscription test_article$ClientId$D for the article topic has been successfully retrieved. <16:10:08> The rule $Default for the test_article$ClientId$D subscription of the host2wms_article topic has been successfully retrieved. <16:29:11> Exception: Provide a valid sub-queue name. The allowed values are: '$DeadLetterQueue'. Parameter name: name
For more details on client-scoped subscriptions, please check this link:
https://learn.microsoft.com/en-us/azure/service-bus-messaging/java-message-service-20-entities#representation-of-client-scoped-subscriptions
Tool version :
I've used the latest, 5.0.15, and could create and consume messages from a subscription using client-scoped representation.
Could you update your SBE and try again?
Could you share Azure CLI or Bicep scripts to provision this as on my end I can't reproduce the issue.
I still have the same issue with 5.0.15/
I am using Terraform to spin up the subscription. The service bus namespace has geo disaster recovery enabled and the connection string is using an alias connection string instead of a plain connection string.
For geo-disaster recover please check https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-geo-dr
locals {
subscription_name = "test_subscription"
client_id = "ClientId"
}
resource "azurerm_servicebus_subscription" "subscription" {
count = local.is_enable ? 1 : 0
name = local.subscription_name
topic_id = "some topic id"
max_delivery_count = 3
dead_lettering_on_message_expiration = false
dead_lettering_on_filter_evaluation_error = false
enable_batched_operations = true
client_scoped_subscription_enabled = true
client_scoped_subscription {
client_id = local.client_id
is_client_scoped_subscription_shareable = true
}
}