-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When receiving a message via a Processor, the value in the LockedUntil member of the message arriving in the ServiceBus SDK is not castable to a DateTime as it is a UInt64:
This happens here:
The value is brought in like this:
Causing the following stacktrace:
System.InvalidCastException: Unable to cast object of type 'System.UInt64' to type 'System.DateTime'.
at Azure.Messaging.ServiceBus.ServiceBusReceivedMessage.get_LockedUntil()
at Azure.Messaging.ServiceBus.CancellationTokenSourceExtensions.CancelAfterLockExpired(CancellationTokenSource cancellationTokenSource, ServiceBusReceivedMessage receivedMessage)
at Azure.Messaging.ServiceBus.ProcessMessageEventArgs..ctor(ServiceBusReceivedMessage message, ReceiverManager manager, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.ProcessMessageEventArgs..ctor(ServiceBusReceivedMessage message, ReceiverManager manager, String identifier, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.ReceiverManager.ConstructEventArgs(ServiceBusReceivedMessage message, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.ReceiverManager.ProcessOneMessage(ServiceBusReceivedMessage triggerMessage, CancellationToken cancellationToken)
This leads to the message being sent to the error eventhandler immediately without being able to process it.
If you require more info, please let me know
Metadata
Metadata
Assignees
Labels
No labels