Currently creating amqp connection by overriding setRemoteURI("") of JmsConnectionFactory(qpid apache) application-context.xml
<bean id="amqpConfig" class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory">
<bean class="com.abc.AMQPSConnectionFactory">
</bean>
</property>
</bean>
<bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent">
<property name="testConnectionOnStartup" value="true" />
<property name="configuration" ref="amqpConfig" />
</bean>
My AMQPSConnectionFactory - currently is creating amqp connection with given KEYSTORELOCATION, KEYSTOREPASSWORD, KEYSTORETYPE by overriding setRemoteURI("") of JmsConnectionFactory as shown
public class AMQPSConnectionFactory extends JmsConnectionFactory {
public AMQPSConnectionFactory() {
setRemoteURI("URL?jms.prefetchPolicy.queuePrefetch=true&transport.keyStoreLocation=KEYSTORELOC&transport.keyStorePassword=KEYSTOREPASSWORD&transport.keyStoreType=KEYSTORETYPE&transport.trustAll=true&transport.enabledProtocols=TLSv1.2");
}
}
How can I create amqp connection by passing the base 64 encoded CERTIFICATE string (instead of the KEYSTORELOCATION), base 64 encoded PASSWORD of that certificate(instead of KEYSTOREPASSWORD) and KEYSTORETYPE at the run time?
Issue: I cannot keep certificate at a path(to give KEYSTORELOCATION in uri), but need to use the certificate string itself