public GuidId CreateSubscriptionId(StreamId streamId, IStreamConsumerExtension streamConsumer) { GrainId grainId = GrainExtensions.GetGrainId(streamConsumer); Guid subscriptionGuid; if (!implicitTable.TryGetImplicitSubscriptionGuid(grainId, streamId, out subscriptionGuid)) { throw new ArgumentOutOfRangeException(streamId.ToString(), "Only implicit subscriptions are supported."); } return(GuidId.GetGuidId(subscriptionGuid)); }
public GuidId CreateSubscriptionId(IAddressable requesterAddress, StreamId streamId) { GrainId grainId = GrainExtensions.GetGrainId(requesterAddress); Guid subscriptionId; if (!implicitPubSub.TryGetImplicitSubscriptionGuid(grainId, streamId, out subscriptionId)) { subscriptionId = SubscriptionMarker.MarkAsExplicitSubscriptionId(Guid.NewGuid()); } return(GuidId.GetGuidId(subscriptionId)); }