【问题标题】:Azure EventHub ConnectionStringBuilder not returning the correct connection stringAzure EventHub ConnectionStringBuilder 未返回正确的连接字符串
【发布时间】: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


    【解决方案1】:

    我错过了 SaSKey 的最后一个字符,所以它没有用...抱歉这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-06
      • 2016-08-21
      • 1970-01-01
      • 2019-12-24
      • 2013-05-29
      • 2011-08-06
      • 1970-01-01
      相关资源
      最近更新 更多