Skip to content

RedisQueueMessageDrivenEndpoint setReceiveTimeout(): Javadoc does not match code #2228

@matthjes

Description

@matthjes

Hi,

I want to use a RedisQueueMessageDrivenEndpoint that blocks until a new message arrives, so I would have expected to set the receive timeout to 0. This is also mentioned in the Javadoc:

A timeout of zero can be used to block indefinitely. If not set explicitly the timeout value will default to {@code 1000}

However, in the code the first line asserts that receive timeout is > 0:

public void setReceiveTimeout(long receiveTimeout) {
    Assert.isTrue(receiveTimeout > 0, "'receiveTimeout' must be > 0.");
    this.receiveTimeout = receiveTimeout;
}

The documentation for BLPOP also mentions that a timeout of 0 blocks indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions