0

need to create queue in eventhub for receive messages sent to it using python, but got this error when using the code below.

note : policy is set to send, listen.

thanks

from azure.servicebus import ServiceBusService

sbs = ServiceBusService("xxhubspacexx",
                        shared_access_key_name="xxpolicyxx",
                        shared_access_key_value="xxkeyvalxx")

sbs.create_queue("taskqueue") #AzureHttpError: Unauthorized
dson9966
  • 1
  • 4

1 Answers1

1
  1. You call it Event Hubs but it's actually a Service Bus Queue. They are distinct services. Event Hubs have no queues.
  2. The error message is quite clear I think: the shared access policy that you are using has permissions for Send and Listen, but no Manage permission which is required to create Service Bus queues.
Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107