Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
UliKu-philips opened this issue Nov 30, 2023 · 0 comments
Labels
defect Suspected defect such as a bug or regression

Comments

@UliKu-philips
Copy link

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

@UliKu-philips UliKu-philips added the defect Suspected defect such as a bug or regression label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

1 participant