Search code examples
servicebus

RecevieAndDelete mode when using the message pump programming model


I have a question about the message pump in Service Bus for Windows Server. If I want to use the receive mode RecevieAndDelete for a client that consumes messages on a queue, how does that correlate when using the OnMessage method on the QueueClient, specifically OnMessageOptions AutoComplete. My understanding is that when retrieving messages from a queue using the ReceiveAndDelete mode on the QueueClient the message will be removed immediately from the queue. Is the AutoComplete setting then ignored on the OnMessageOptions?


Solution

  • Correct. If QueueClient is created with Mode.ReceiveAndDelete - then OnMessageOptions.AutoComplete property is moot.

    HTH! Sree