I have a problem with my BrokeredMessage complete.
Simple code that works as expected:
private void OnMessageArrived(BrokeredMessage message) { var myObj= message.GetBody<MyObject>();
When I try to wait for the user to finish with myObj, I get an exception:
shown by broker placed
Code below:
private Dictionary<long, BrokeredMessage> ReceivedMessages; ReceivedMessages = new Dictionary<long, BrokeredMessage>(); private void OnMessageArrived(BrokeredMessage message) { var myObj= message.GetBody<MyObject>(); ReceivedMessages.Add(myObj.Id, message);
It seems to me that ServiceBus will somehow lose connection with the real object in C #
Something similar to a separate object in EF, only in this case the object is disconnected from the ServiceBus
EDIT:
It is important for me to mark the message as complete only after clicking the user button. In the event of a drop in AC (or similar things), I want the messages to remain in the Bus Bus Topic section so that the next time the user starts the application, he will again receive messages that he did not process.
source share