spring-cloud / spring-cloud/spring-cloud-stream
RabbitMessageChannelBinder fails to initialize LocalizedQueueConnectionFactory if ssl.enabled is not specified
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
@vkochnev commented on Wed Nov 03 2021
Shouldn't it be this.rabbitProperties.getSsl().determineEnabled() instead? The problem is if spring.rabbitmq.ssl.enabled is not specified in application.yml this line fails with NPE.
Also if virtualHost, username and/or password are specified on addresses instead of separate fields current implementation will ignore them, use of determine* alternatives might help here also (It looks like I should file these separately, but I'm not sure it makes sense).
More comprehensive solution might be discussed in https://github.com/spring-projects/spring-amqp/issues/1384
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in spring-cloud-stream-binder-rabbit/src/main/java/org/springframework/cloud/stream/binder/rabbit/RabbitMessageChannelBinder.java at the referenced line around 262. Reproduce initialization with spring.rabbitmq.ssl.enabled omitted, then inspect how virtualHost, username, and password supplied on an address are handled. Done means initialization no longer fails in the reported configuration and the intended address properties are not ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, rabbitmq
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100