Skip to content

The error message is unhelpful when spring.rabbitmq.host is configured with a comma-separated value#35684

Closed
rafaelrc7 wants to merge 1 commit intospring-projects:mainfrom
rafaelrc7:35628_add_rabbitmq_host_error_msg
Closed

The error message is unhelpful when spring.rabbitmq.host is configured with a comma-separated value#35684
rafaelrc7 wants to merge 1 commit intospring-projects:mainfrom
rafaelrc7:35628_add_rabbitmq_host_error_msg

Conversation

@rafaelrc7
Copy link
Contributor

As discussed on issue #35628, at some point the host property accepted multiple comma-separated hosts. However, this was not intended, and for better clarification, it was decided to implement a clearer error message for this situation.

This PR adds an extra check in org.springframework.boot.autoconfigure.amqp.RabbitProperties#determineAddresses for commas in the host property, throwing an InvalidConfigurationPropertyValueException if any is found.

As discussed on issue spring-projects#35628, at some point the host property accepted multiple comma-separated hosts. However, this was not intended, and for better clarification, it was decided to implement a clearer error message for this situation.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 31, 2023
@mhalbritter mhalbritter added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 31, 2023
@mhalbritter mhalbritter added this to the 3.1.x milestone May 31, 2023
@mhalbritter mhalbritter changed the title Implement validity check to spring.rabbitmq.host config property Check whether spring.rabbitmq.host config property is valid May 31, 2023
@wilkinsona wilkinsona changed the title Check whether spring.rabbitmq.host config property is valid The error message is unhelpful when spring.rabbitmq.host is configured with a comma-separated value Jun 1, 2023
@mhalbritter mhalbritter self-assigned this Jun 5, 2023
@mhalbritter
Copy link
Contributor

Thank you very much and congratulations on your first contribution 🎉!

@mhalbritter mhalbritter modified the milestones: 3.1.x, 3.1.1 Jun 5, 2023
mhalbritter pushed a commit that referenced this pull request Jun 5, 2023
As discussed on issue #35628, at some point the host property accepted
multiple comma-separated hosts. However, this was not intended, and for
better clarification, it was decided to implement a clearer error
message for this situation.

See gh-35684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants