# EventHubAdapterFactory.QueueMessageBatchAsync(StreamId, IEnumerable&lt;T&gt;, StreamSequenceToken?, Dictionary&lt;string, object&gt;)

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

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubAdapterFactory.cs#L223-L225)

```csharp
public virtual Task QueueMessageBatchAsync<T>(StreamId streamId, IEnumerable<T> events, StreamSequenceToken? token, Dictionary<string, object>? requestContext)
```

Writes a set of events to the queue as a single batch associated with the provided streamId.

### Parameters

- `streamId` (`StreamId`)
- `events` (`IEnumerable<T>`)
- `token` (`StreamSequenceToken?`)
- `requestContext` (`Dictionary<string, object>`)
