Example #1
0
        internal Publication AddPublication(string channel, int streamId)
        {
            VerifyActive();

            Publication publication = _activePublications.Get(channel, streamId);

            if (null == publication)
            {
                AwaitResponse(_driverProxy.AddPublication(channel, streamId), channel);
                publication = _activePublications.Get(channel, streamId);
            }

            publication.IncRef();

            return(publication);
        }
Example #2
0
        internal Publication AddPublication(string channel, int streamId)
        {
            if (_isClosed)
            {
                throw new InvalidOperationException("Aeron client is closed");
            }

            Publication publication = _activePublications.Get(channel, streamId);

            if (null == publication)
            {
                AwaitResponse(_driverProxy.AddPublication(channel, streamId), channel);
                publication = _activePublications.Get(channel, streamId);
            }

            publication.IncRef();

            return(publication);
        }