예제 #1
0
        private string LookupStreamBySubject(string subject)
        {
            byte[]            body = JsonUtils.SimpleMessageBody(ApiConstants.Subject, subject);
            Msg               resp = RequestResponseRequired(JetStreamConstants.JsapiStreamNames, body, Timeout);
            StreamNamesReader snr  = new StreamNamesReader();

            snr.Process(resp);
            return(snr.Strings.Count == 1 ? snr.Strings[0] : null);
        }
예제 #2
0
        public IList <string> GetStreamNames()
        {
            StreamNamesReader snr = new StreamNamesReader();

            while (snr.HasMore())
            {
                Msg m = RequestResponseRequired(JetStreamConstants.JsapiStreamNames, snr.NextJson(), Timeout);
                snr.Process(m);
            }
            return(snr.Strings);
        }