Skip to content

PooledQueueCache.TryGetNextMessageWithResult(object, IBatchContainer?)

TryGetNextMessageWithResult(object, IBatchContainer?)

View source
public QueueCacheCursorMoveResult TryGetNextMessageWithResult(object cursorObj, out IBatchContainer? message)
Attempts to acquire the next message in the cache at the provided cursor.

Parameters

cursorObjobject
The cache cursor.
messageIBatchContainer?
The next message when one is available.

Returns

A successful result with a non-null message, QueueCacheCursorMoveResultKind with a null message, or a cache-miss result with a null message.

Exceptions

System.ArgumentNullException
cursorObj is null.
System.ArgumentOutOfRangeException
cursorObj is not a cache cursor.