Generate test app when RabbitMQ Streams is selected#1611
Open
eddumelendez wants to merge 2 commits intospring-io:mainfrom
Open
Generate test app when RabbitMQ Streams is selected#1611eddumelendez wants to merge 2 commits intospring-io:mainfrom
eddumelendez wants to merge 2 commits intospring-io:mainfrom
Conversation
Contributor
|
I'd like to wait until spring-projects/spring-boot#42443 is resolved before proceeding here. |
smalghate
reviewed
Jun 10, 2025
| } | ||
|
|
||
| private boolean isAmqpEnabled(Build build) { | ||
| return build.dependencies().has("amqp") || build.dependencies().has("amqp-streams"); |
There was a problem hiding this comment.
Moving the value to a constant file enhances the maintainability of the code. It centralizes the value, making it easier to update and manage. If the value needs to be changed, it can be done in one place without searching through the entire codebase
Contributor
|
To properly get RabbitMQ streams working, we'd need to be able to generate a services:
rabbitmq:
image: 'rabbitmq:latest'
environment:
- 'RABBITMQ_DEFAULT_PASS=secret'
- 'RABBITMQ_DEFAULT_USER=myuser'
configs:
- source: plugins
target: /etc/rabbitmq/enabled_plugins
ports:
- '5672'
- '5552'
configs:
plugins:
content: "[rabbitmq_stream]."and for Testcontainers: @Bean
@ServiceConnection(type = RabbitStreamConnectionDetails.class)
RabbitMQContainer rabbitContainer() {
return new RabbitMQContainer(DockerImageName.parse("rabbitmq:latest"))
.withExposedPorts(5552)
.withCopyToContainer(Transferable.of("[rabbitmq_stream]."), "/etc/rabbitmq/enabled_plugins");
} |
mhalbritter
pushed a commit
to eddumelendez/start.spring.io
that referenced
this pull request
Feb 23, 2026
c45a19a to
6e5cfd8
Compare
6e5cfd8 to
a3700d3
Compare
Contributor
|
I rebased this branch on top of |
Contributor
|
I've created spring-io/initializr#1758 and #2089 and #2090. |
2dd10fc to
0ac42ac
Compare
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
0ac42ac to
270f569
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, when rabbitmq streams and docker compose/testcontainers are selected, no container is provided. For that reason, the test and test app can not be executed sucessfully. RabbitMQ Streams requires an additional configuration to enable it using Spring Boot and also in the container itself but providing RabbitMQ service would be enough to execute the test and test app.
The configuration to enable rabbitmq streams can be found here