Пример #1
0
        private async Task <ISet <PubSubSubscriptionState> > RegisterProducer()
        {
            var tup = await providerRuntime.BindExtension <SimpleMessageStreamProducerExtension, IStreamProducerExtension>(
                () => new SimpleMessageStreamProducerExtension(providerRuntime, fireAndForgetDelivery));

            myExtension      = tup.Item1;
            myGrainReference = tup.Item2;

            myExtension.AddStream(stream.StreamId);

            // Notify streamRendezvous about new stream streamProducer. Retreave the list of RemoteSubscribers.
            return(await pubSub.RegisterProducer(stream.StreamId, streamProviderName, myGrainReference));
        }