Receiving a message from an Azure topic is null, the topic has unread messages

Yesterday, I was able to read messages from the Azure Service Bus Topic subscription that I created myself many times. However, today, using the same code as yesterday, all messages are zero, despite the fact that the number of messages in the subscription is much higher than 0. Let me clarify:

Following the instructions on MSDN on how to read messages from a subscription , I use the following to read messages from a subscription client:

var tokenProvider = TokenProvider.CreateSharedSecretTokenProvider("MySubscriber","MyKey");
var serviceUri = ServiceBusEnvironment.CreateServiceUri("sb", "MyNamespace", string.Empty);
var messagingFactory = MessagingFactory.Create(serviceUri, tokenProvider);
var subscriptionClient = messagingFactory.CreateSubscriptionClient("MyTopicName", "MySubscriptionName", ReceiveMode.PeekLock);

var brokeredMessage = subscriptionClient.Receive();

Today, the brokeredMessage variable is always null, but as you can see from the following screenshot, there are several messages in the subscription. enter image description here

So why brokeredMessage == null?

: = 1 , = 10 , , = .

: = 10 , = 5 , = 10, = , , , ,

.

+4
1
+4

Source: https://habr.com/ru/post/1526694/


All Articles