use of io.smallrye.common.annotation.Identifier in project smallrye-reactive-messaging by smallrye.
the class RabbitMQProducers method getNamedOptions.
// <named>
@Produces
@Identifier("my-named-options")
public RabbitMQOptions getNamedOptions() {
// You can use the produced options to configure the TLS connection
PemKeyCertOptions keycert = new PemKeyCertOptions().addCertPath("./tls/tls.crt").addKeyPath("./tls/tls.key");
PemTrustOptions trust = new PemTrustOptions().addCertPath("./tlc/ca.crt");
return (RabbitMQOptions) new RabbitMQOptions().setUser("admin").setPassword("test").setSsl(true).setPemKeyCertOptions(keycert).setPemTrustOptions(trust).setHostnameVerificationAlgorithm("").setConnectTimeout(30000).setReconnectInterval(5000);
}
use of io.smallrye.common.annotation.Identifier in project smallrye-reactive-messaging by smallrye.
the class ClientProducers method getNamedOptions.
// <named>
@Produces
@Identifier("my-named-options")
public AmqpClientOptions getNamedOptions() {
// You can use the produced options to configure the TLS connection
PemKeyCertOptions keycert = new PemKeyCertOptions().addCertPath("./tls/tls.crt").addKeyPath("./tls/tls.key");
PemTrustOptions trust = new PemTrustOptions().addCertPath("./tlc/ca.crt");
return new AmqpClientOptions().setSsl(true).setPemKeyCertOptions(keycert).setPemTrustOptions(trust).addEnabledSaslMechanism("EXTERNAL").setHostnameVerificationAlgorithm("").setConnectTimeout(30000).setReconnectInterval(5000).setContainerId("my-container");
}
Aggregations