Customizing the underlying AMQP client
You can customize the underlying AMQP Client configuration by
producing an instance of
AmqpClientOptions
:
| @Produces
@Identifier("my-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");
}
|
This instance is retrieved and used to configure the client used by the
connector. You need to indicate the name of the client using the
client-options-name
attribute:
| mp.messaging.incoming.prices.client-options-name=my-named-options
|
Client capabilities
Both incoming and outgoing AMQP channels can be configured with a list
of capabilities to declare during sender and receiver connections with
the AMQP broker. Note that supported capability names are broker
specific.
| mp.messaging.incoming.sink.capabilities=temporary-topic
...
mp.messaging.outgoing.source.capabilities=shared
|