Apache.NMS.ActiveMQ.Session.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public void Start()
        {
            foreach(MessageConsumer consumer in this.consumers.Values)
            {
                consumer.Start();
            }

            if(this.executor != null)
            {
                this.executor.Start();
            }
        }

Usage Example

        /// <summary>
        /// Creates a new session to work on this connection
        /// </summary>
        public ISession CreateSession(AcknowledgementMode sessionAcknowledgementMode)
        {
            SessionInfo info = CreateSessionInfo(sessionAcknowledgementMode);

            SyncRequest(info, this.RequestTimeout);
            Session session = new Session(this, info, sessionAcknowledgementMode, this.dispatchAsync);

            // Set propertieDs on session using parameters prefixed with "session."
            if (!String.IsNullOrEmpty(brokerUri.Query) && !brokerUri.OriginalString.EndsWith(")"))
            {
                string           query   = brokerUri.Query.Substring(brokerUri.Query.LastIndexOf(")") + 1);
                StringDictionary options = URISupport.ParseQuery(query);
                options = URISupport.GetProperties(options, "session.");
                URISupport.SetProperties(session, options);
            }

            session.ConsumerTransformer = this.ConsumerTransformer;
            session.ProducerTransformer = this.ProducerTransformer;

            if (IsStarted)
            {
                session.Start();
            }

            sessions.Add(session);
            return(session);
        }
All Usage Examples Of Apache.NMS.ActiveMQ.Session::Start