0
votes

I have encounter a very strange behavior that I can't seem to understand or solve with the Azure Service Bus. I have a queue set up and send 1 message to it. And I can see that the message exist in the queue.

enter image description here

I then try to read the message with the ReceiveAsync() method but that always return NULL. But if I use the PeekAsync() method I can see that there is a message and I can get it and use it. But since there isn't any LockToken generated with the PeekAsync() method I can't remove it after with the CompleteAsync() method (that would not have solved the problem, but at least make my code work).

enter image description here

Anybody that has encounter something like this before? I read somewhere that somebody had had a similar problem when using partition on the queue, but I don't do that.

Best regards Magnus

1

1 Answers

0
votes

I found the issue.

There was a Logic App that tried to read messages from the same servicesbus, but the reading was failed when the Logic App read the message.

And my guess is that the logic app read the message and failed, and then the messages was "hidden" for other readers to read the same message, but it was okay to peek the message.

So when I close down the Logic App, my code could use the receiveAsync() method to get the message.