Skip to content

IIterableConsumer.NextMessage: documentation does not match implementation of timeoutMillis parameter #849

Description

@UliKu-philips

Observed behavior

Definition and documentation:

Documentation states "Use a timeout of 0 to wait indefinitely"

    public interface IIterableConsumer : IMessageConsumer
    {
        /// <summary>
        /// Read the next message. Return null if the calls times out.
        /// Use a timeout of 0 to wait indefinitely. This could still be interrupted if
        /// the subscription is unsubscribed or the client connection is closed.
        /// </summary>
        /// <param name="timeoutMillis">the maximum time to wait</param>
        /// <returns>the next message for this subscriber.</returns>
        Msg NextMessage(int timeoutMillis);
    }

Channel.cs:

if (timeout < 0)
    ...

Expected behavior

Documentation should match implementation, either "Use a timeout of < 0 to wait indefinitely" or implementation in Channel.cs: if (timeout <= 0

Server and client version

Nats.Client v1.1.1

Host environment

No response

Steps to reproduce

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions