public QueueBrowser(Session session, MessageQueue messageQueue, string selector) { this.session = session; this.messageQueue = messageQueue; if (null != this.messageQueue) { this.messageQueue.MessageReadPropertyFilter.SetAll(); } this.selector = selector; reader = MessageReaderUtil.CreateMessageReader( messageQueue, session.MessageConverter, selector); }
/// <summary> /// Constructs a message consumer on the specified queue, using a /// selector for filtering incoming messages. /// </summary> /// <param name="session">The messaging session.</param> /// <param name="acknowledgementMode">The message acknowledgement mode.</param> /// <param name="messageQueue">The message queue to consume messages from.</param> /// <param name="selector">The selection criteria.</param> public MessageConsumer(Session session, AcknowledgementMode acknowledgementMode, MessageQueue messageQueue, string selector) { this.session = session; this.acknowledgementMode = acknowledgementMode; this.messageQueue = messageQueue; if (this.messageQueue != null) { this.messageQueue.MessageReadPropertyFilter.SetAll(); } reader = MessageReaderUtil.CreateMessageReader( messageQueue, session.MessageConverter, selector); }