# EventHubQueueCache.TryGetNextMessage(object, IBatchContainer)

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubQueueCache.cs#L154-L161)

```csharp
public bool TryGetNextMessage(object cursorObj, out IBatchContainer message)
```

Try to get the next message in the cache for the provided cursor.

### Parameters

- `cursorObj` (`object`)
- `message` (`IBatchContainer`)
