Skip to content

Memory Leak when handler fails #37

@srpeirce

Description

@srpeirce

We have observed a memory leak that seems to be caused when a message fails to process.

In failure scenarios we rely on the peek lock timeout, but we do not call MessageReceiver with CompleteAsync, DeadletterAsync, DeferredAsync etc, so the message is never disposed.

https://github.com/Azure/azure-service-bus-dotnet/blob/master/src/Microsoft.Azure.ServiceBus/Core/MessageReceiver.cs

I initially thought that we could call DeferredAsync but that will put the message back on the queue and instantly be processed.

Instead I think it might be better to clone the message and re-send it after a specified time.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions