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

Consider to add Rabbit Stream auto-creation hook #2445

Closed
artembilan opened this issue Apr 7, 2023 · 1 comment · Fixed by #2446
Closed

Consider to add Rabbit Stream auto-creation hook #2445

artembilan opened this issue Apr 7, 2023 · 1 comment · Fixed by #2446

Comments

@artembilan
Copy link
Member

Currently we have to use something like Environment.streamCreator().stream("stream.stream").create() which even is not mentioned in the docs: https://docs.spring.io/spring-amqp/reference/html/#super-streams.
We do have an auto-creation for SuperStream though, perhaps something similar could be achieved for regular stream.
Something like this:

@Bean
Stream myStream(Environment env) {
    return Stream.builder().environment(env).name(...).build();
}

Or something like Map.of("x-queue-type", "stream") for regular Queue declaration is enough so far?
Shouldn't this be mentioned in the doc then somehow?

Also there is no pointers in the doc about spring-rabbit-stream dependency.

We also need to present a sample application somewhere.

@joshlong also asked about Rabbit Stream checkbox on start.spring.io, similar to the Apache Kafka Streams, but that fully different story.

@garyrussell
Copy link
Contributor

FYI, we already have support in the QueueBuilder:

/**
* Set the queue argument to declare a queue of type 'stream' instead of 'classic'.
* @return the builder.
* @since 2.4
*/
public QueueBuilder stream() {
return withArgument("x-queue-type", "stream");
}

But I agree it is missing from the docs.

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

Successfully merging a pull request may close this issue.

2 participants