# IEventHubQueueCache.TryGetCursorAtPosition(StreamId, StreamSubscriptionStartPosition)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/IEventHubQueueCache.cs#L78-L88)

```csharp
public virtual QueueCacheCursorResult<object> TryGetCursorAtPosition(StreamId streamId, StreamSubscriptionStartPosition startPosition)
```

Attempts to get a cursor into the cache at the specified subscription start position.

### Parameters

- `streamId` (`StreamId`): The stream identifier.
- `startPosition` (`StreamSubscriptionStartPosition`): The initial subscription position.

### Returns

A successful result containing the acquired cursor, a cache-miss result containing the unavailable position and current cache bounds, or [QueueCacheCursorResultKind](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.queuecachecursorresultkind/).

### Exceptions

- `System.ArgumentOutOfRangeException`: `startPosition` is not defined.
