【发布时间】:2016-05-19 11:37:50
【问题描述】:
我正在尝试使用以下链接 https://azure.microsoft.com/en-us/documentation/articles/event-hubs-java-storm-getstarted/ 开始使用 Eventhubs。
当我将连接字符串直接传递给 ConnectionStringBuilder(connectionString) 时,程序会向 Eventhub 发送数据。我注意到连接字符串
以 Endpoint=sb://.... 开头
但是当我使用 ConnectionStringBuilder(namespaceName, eventHubName, sasKeyName, sasKey) 时,我注意到创建了连接字符串
以 Endpoint=amqps:// 开头
程序不工作并给出以下错误
com.microsoft.azure.servicebus.AuthorizationFailedException: Attempted to perform an unauthorized operation.
【问题讨论】:
标签: azure-eventhub