Skip to content

IndexOutOfRangeException happens when trying to get the queue message #1162

Description

@rmt2021

Version Information
3d881af

Describe the bug

When using SendNext method to send a message to the queue based on Azure Queue service, it may encounter transient errors (e.g., 503). So the Queue SendMessageAsync called inside will fail. However, it may not fail immediately but will fail at the ReceiveMessageAsync when trying to get the message, and a System.IndexOutOfRangeException will appear.

To Reproduce

We found the test Akka.Streams.Azure.StorageQueue.Tests.QueueSinkSpec.A_QueueSink_should_skip_failing_messages_if_supervision_strategy_is_restart which exercises the SendMessageAsync and ReceiveMessageAsync could be used to reproduce. Stack trace:

...
System.IndexOutOfRangeException : Index was outside the bounds of the array.
at Akka.Streams.Azure.StorageQueue.Tests.QueueSinkSpec.A_QueueSink_should_skip_failing_messages_if_supervision_strategy_is_restart() in C:\Users\Ze\Alpakka\src\Azure\Akka.Streams.Azure.StorageQueue.Tests\QueueSinkSpec.cs:line 88
...

Environment
Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions