/// <summary> /// Receives the specified queue name. /// An abstraction over a third-party messaging library. Used to read messages from the broker and to acknowledge the processing of those messages or requeue them. /// Used by a <see cref="Channel"/> to provide access to a third-party message queue. /// </summary> /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param> /// <returns>Message.</returns> public Message[] Receive(int timeoutInMilliseconds) { var rc = _sqlQ.TryReceive(_topic, timeoutInMilliseconds); var message = !rc.IsDataValid ? new Message() : rc.Message; return(new Message[] { message }); }
/// <summary> /// Receives the specified queue name. /// An abstraction over a third-party messaging library. Used to read messages from the broker and to acknowledge the processing of those messages or requeue them. /// Used by a <see cref="Channel"/> to provide access to a third-party message queue. /// </summary> /// <param name="timeoutInMilliseconds">The timeout in milliseconds.</param> /// <returns>Message.</returns> public Message Receive(int timeoutInMilliseconds) { var rc = _sqlQ.TryReceive(_topic, timeoutInMilliseconds); return(!rc.IsDataValid ? new Message() : rc.Message); }