I'm involved in a multi-tier project, one part of which is consuming a stream of "events" from a third-party system. The vendor is publishing these via an Azure Service Bus Topic - they provide, control & manage the Bus. We are simply provided with the URI, TopicName and Subscription details.
Our approach was to put together a Webjob, using the provided ServiceBusTrigger
in the SDK to handle listening for new messages & triggering processing them into our system. However, we seem to have hit a roadblock in-so-much as the job continuously fails to read from the Topic. The job fails with a vague Timeout Exception
:
Unhandled Exception: System.TimeoutException: The timeout elapsed upon attempting to obtain a token while accessing 'https://****-sb.accesscontrol.windows.net/WRAPv0.9/'.
---> System.IdentityModel.Tokens.SecurityTokenException: The token provider was unable to provide a security token while accessing 'https://****-sb.accesscontrol.windows.net/WRAPv0.9/'.
Token provider returned message: 'The operation has timed out'.
But further down, the trace includes:
[ERR] at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
[ERR] at Microsoft.ServiceBus.NamespaceManager.OnEndTopicExists(IAsyncResult result)
[ERR] at Microsoft.ServiceBus.NamespaceManager.EndTopicExists(IAsyncResult result)
The vendor has subsequently confirmed that the only permission / claim the Subscription has on the Topic is Listen
Can anyone confirm what the permission requirements are for the ServiceBusTrigger
?
And as a +1, on the assumption that it, for whatever reason, needs more the Listen
(i.e needs Manage
), would anyone like to suggest an alternative approach? It seems a shame to lose the WebJob infrastructure (the project already has 3 other jobs) - especially the loss of features like the async & concurrent processing of messages from the Topic