question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it intended that if a Subscription does not exist a ServiceBusCommunicationEx is thrown instead of a MessagingEntityNotFoundEx?

See original GitHub issue

Query/Question Is it intended that if a Subscription does not exist a ServiceBusCommunicationEx is thrown rather than a MessagingEntityNotFoundException?

Why is this not a Bug or a feature Request? Our team is currently building a wrapper around the Microsoft.Azure.ServiceBus project and have noticed that when a Topic or Queue does not exist a MessagingEntityNotFoundException is thrown whereas when a Subscription does not exists a ServiceBusCommunicationException is thrown.

Is this intended and if yes why so?.. Doesn’t a Topic + Subscription make up a Messaging Entity?

Setup

  • OS: Windows 10 version 1809
  • IDE : Visual Studio Enterprise 2019
  • Version of the Library used: 3.4.0
protected override void SubscribeInternal()
{
	RetryExponential retryExponential = new RetryExponential(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(20), 3);

	string topicName = "TestTopic";
	//This subscription has not been created
	string subscriptionName = "Sub1";

        _azureSubscriptionClient = new SubscriptionClient(this._getConnectionString(), topicName, subscriptionName, ReceiveMode.PeekLock, retryExponential);
	MessageHandlerOptions messageHandlerOptions = new MessageHandlerOptions(_onExceptionThrownHandler)
	{                   
	    MaxConcurrentCalls = _topicSubscriptionConnectionOptions.MaxConcurrentMessages,                   
	    AutoComplete = false
	};
	_azureSubscriptionClient.RegisterMessageHandler(_onMessageReceivedHandler, messageHandlerOptions);
}

private Task _onExceptionThrownHandler(ExceptionReceivedEventArgs exceptionReceivedEventArgs)
{
    Exception exception = exceptionReceivedEventArgs.Exception;
    //exception.GetType() == 'ServiceBusCommunicationException'
    ...
}

private async Task _onMessageReceivedHandler(Message message, CancellationToken token)
{
    ...
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
axisccommented, Sep 27, 2019

@TheReaLee - thanks for raising this.

I think this is definitely a MessagingEntityNotFoundException. Adding it to the backlog and assigning the January milestone to it.

0reactions
msftbot[bot]commented, Oct 12, 2019

Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Topic not found exception is swallowed · Issue #32
Where I take issue is that when using Brokered Messaging the actual subscriptions are hidden behind an endpoint (the topic or exchange), and ......
Read more >
Tree diagrams and conditional probability (article)
If a bag doesn't contain a forbidden item, there is an 8 % 8\% 8%8, percent chance that it triggers the alarm. Given...
Read more >
Events A and B are independent if: knowing whether A ...
Events A and B are independent if: knowing whether A occured does not change the probability of B. Mathematically, can say in two...
Read more >
Events and Its Algebra - Probability
An event in which all the outcome has an equal chance to occur. In throwing a die, all six faces are equally likely...
Read more >
Math Review Large Print (18 point) Edition Chapter 4
The GRE® Math Review consists of 4 chapters: Arithmetic,. Algebra, Geometry, and Data Analysis. This is the Large Print edition of the Data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found