Skip to content

Environment.queryStreamStats not doing lazy initialization #368

Closed
@mdleonid

Description

@mdleonid

Describe the bug

When Streams Environment is used with lazy initialization, calling queryStreamStats() fails with

com.rabbitmq.stream.impl.StreamEnvironment$LocatorNotAvailableException: Locator not available
	at com.rabbitmq.stream.impl.StreamEnvironment.locatorOperation(StreamEnvironment.java:738)
	at com.rabbitmq.stream.impl.StreamEnvironment.locatorOperation(StreamEnvironment.java:692)
	at com.rabbitmq.stream.impl.StreamEnvironment.queryStreamStats(StreamEnvironment.java:484)

stream-client version is 0.10.0

Reproduction steps

  1. Create Environment with EnvironmentBuilder.lazyInitialization(true)
  2. Call streamsEnvironment.queryStreamStats("abc") as the first call
  3. Catch the LocatorNotAvailableException

Expected behavior

A StreamStats is returned or a StreamDoesNotExistException is thrown.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions