Skip to content

IStreamSubscriptionManager Methods

Functionality for managing stream subscriptions.

AddSubscription(string, StreamId, GrainReference)

abstract
public abstract Task<StreamSubscription> AddSubscription(string streamProviderName, StreamId streamId, GrainReference grainRef)
Subscribes the specified grain to a stream.

Parameters

streamProviderNamestring
Name of the stream provider.
streamIdStreamId
The stream identifier.
grainRefGrainReference
The grain reference.

Returns

The stream subscription.

GetSubscriptions(string, StreamId)

abstract
public abstract Task<IEnumerable<StreamSubscription>> GetSubscriptions(string streamProviderName, StreamId streamId)
Gets the subscriptions for a stream.

Parameters

streamProviderNamestring
Name of the stream provider.
streamIdStreamId
The stream identifier.

Returns

The subscriptions.

RemoveSubscription(string, StreamId, Guid)

abstract
public abstract Task RemoveSubscription(string streamProviderName, StreamId streamId, Guid subscriptionId)
Unsubscribes a grain from a stream.

Parameters

streamProviderNamestring
Name of the stream provider.
streamIdStreamId
The stream identifier.
subscriptionIdGuid
The subscription identifier.

Returns

A System.Threading.Tasks.Task representing the operation.