Код: Выделить всё
private void RegisterSubscriptionClientMessageHandler()
{
_subscriptionClient.RegisterMessageHandler(
async (message, token) =>
{
var eventName = $"{message.Label}{INTEGRATION_EVENT_SUFIX}";
var messageData = Encoding.UTF8.GetString(message.Body);
await ProcessEvent(eventName, messageData);
// Complete the message so that it is not received again.
await _subscriptionClient.CompleteAsync(message.SystemProperties.LockToken);
},
new MessageHandlerOptions(ExceptionReceivedHandler) { MaxConcurrentCalls = 10, AutoComplete = false });
}
Код: Выделить всё
await _subscriptionClient.CompleteAsync(message.SystemProperties.LockToken);
Код: Выделить всё
ERROR ON ExceptionReceivedHandler EXEPTION: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or was received by a different receiver instance.
Bazinga.EventBus.Bus.EventBusSubscription:Error: ERROR ON ExceptionReceivedHandler EXEPTION: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue, or was received by a different receiver instance.
- Executing Action: UserCallback
Подробнее здесь: https://stackoverflow.com/questions/521 ... te-message