1

I'm using Spring Boot 1.3.1 and I can auto-configure my JMS components through application.properties.

As I'm using Artemis as my message broker, I'm using spring-boot-starter-artemis, and as states the documentation in this link, all I have to do is replace the spring.hornetq.* properties and place spring.artemis.* instead.

The problem is that it doesn't show how to configure the username, password and SSL configuration for HornetQ/Artemis. I configured Artemis to use SSL and user/pass authentication like it's shown in here.

Does anyone know what properties can I state to add SSL and user/pass?

Thanks!

Raul G
  • 473
  • 1
  • 6
  • 18

2 Answers2

1

Okay, currently the Artemis Spring Boot starter is very basic, it really doesn't support clusters, SSL or client authentication.

Doing a quick look at the starter's source code in GitHub, in the ArtemisConnectionFactoryFactory.java file, at lines 127 and onwards, I will have to add the TransportConstants necessary to configure SSL, authentication, etc.

An example of a more complete connection configuration is in Artemis' test source code, in CoreClientOverTwoWaySSLTest.java, on lines 178 and onwards, there is a really complete connection setup, so to contribute, I have to change the Artemis auto-configuration properties to take the new property options, and add them all to ArtemisConnectionFactoryFactory.java following the example in CoreClientOverTwoWaySSLTest.java

I'll do a fork on the starter, make the modifications, and figure out what bureaucracy is needed to submit a pull request and get it accepted on spring-boot.

Raul G
  • 473
  • 1
  • 6
  • 18
0

Spring Boot does not support such arrangement. Not everything should happen via properties if you ask me but in any case a good way to find out is asking your IDE to auto-complete the keys for that namespace (you'll quickly find out there is nothing related to SSL and security in there). If you don't use an IDE, this appendix should help

Stephane Nicoll
  • 31,977
  • 9
  • 97
  • 89
  • One of the things that a properties file is used for is to avoid having to do the boilerplate code by yourself, so I do consider that, just like it configures host/port, it should be able to specify if a connection is secure or not. I went to the GitHub repository for the artemis starter and saw that it's hardcoded how the connection parameters are set instead of making it more dynamic, as Artemis uses the connection properties from a class called TransportConstants, so I'm going to do a checkout, modify it to add the SSL configuration, perhaps even create a Pull Request for it to contribute – Raul G Jan 20 '16 at 17:48