spring-amqp compatibility with ibm jvm

132 Views Asked by At

I'm using spring-amqp with IBM JVM and when initializing a rabbit template to work with ssl it uses sunx509, but IBM JVM is not compatible with the algorithm so I get:

java.security.NoSuchAlgorithmException: SunX509 KeyManagerFactory not available

I'm not sure how to override the use of sunx509 since the used algorithm is defined in spring-amqp source code

I initialize rabbitmq configuration as shown below Any suggestions?

Thanks

@Configuration
public class RabbitMQConfiguration {

    @Bean
    public RabbitTemplate rabbitTemplate(final ConnectionFactory connectionFactory) {
        final RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory);

        return rabbitTemplate;
    }
}
1

There are 1 best solutions below

0
On BEST ANSWER

You need to show your connection factory configuration.

Bottom line is you need to wire up/configure the com.rabbitmq.client.ConnectionFactory yourself instead of using Spring's RabbitConnectionFactoryBean

It is, indeed hard-coded to SunX509; we should make it configurable. Please open an issue on GitHub.