io.quarkiverse.reactive.messaging.nats.NatsConfiguration Maven / Gradle / Ivy
package io.quarkiverse.reactive.messaging.nats;
import java.time.Duration;
import java.util.Optional;
import io.nats.client.AuthHandler;
import io.nats.client.support.SSLUtils;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;
@ConfigMapping(prefix = "quarkus.messaging.nats")
@ConfigRoot(phase = ConfigPhase.RUN_TIME)
public interface NatsConfiguration {
/**
* A comma-separated list of URI's nats://{host}:{port} to use for establishing the initial connection to the NATS cluster.
*/
String servers();
/**
* The username to connect to the NATS server
*/
Optional username();
/**
* The password to connect to the NATS server
*/
Optional password();
/**
* The token to connect to the NATS server
*/
Optional token();
/**
* The path to the credentials file for creating an {@link AuthHandler AuthHandler}
*/
Optional credentialPath();
/**
* Enable SSL connecting to servers
*/
@WithDefault("true")
Boolean sslEnabled();
/**
* The connection timeout in milliseconds
*/
Optional connectionTimeout();
/**
* Back-off delay between to attempt to re-connect to NATS
*/
Optional connectionBackoff();
/**
* The maximum number of attempts to attempt to re-connect to NATS
*/
Optional connectionAttempts();
/**
* The classname for the error listener
*/
Optional errorListener();
/**
* The size in bytes to make buffers for connections
*/
Optional bufferSize();
/**
* The path to the keystore file
*/
Optional keystorePath();
/**
* The password for the keystore
*/
Optional keystorePassword();
/**
* The path to the trust store file
*/
Optional truststorePath();
/**
* The password for the trust store
*/
Optional truststorePassword();
/**
* The tls algorithm. Default is {@value SSLUtils#DEFAULT_TLS_ALGORITHM}
*/
Optional tlsAlgorithm();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy