public interface EnvironmentBuilder
Environment.EnvironmentBuilder| Modifier and Type | Interface and Description |
|---|---|
static interface |
EnvironmentBuilder.TlsConfiguration
Helper to configure TLS.
|
| Modifier and Type | Method and Description |
|---|---|
EnvironmentBuilder |
addressResolver(AddressResolver addressResolver)
An
AddressResolver to potentially change resolved node address to connect to. |
Environment |
build()
Create the
Environment instance. |
EnvironmentBuilder |
byteBufAllocator(io.netty.buffer.ByteBufAllocator byteBufAllocator) |
EnvironmentBuilder |
channelCustomizer(ChannelCustomizer channelCustomizer)
An extension point to customize Netty's
Channels used for connection. |
EnvironmentBuilder |
chunkChecksum(ChunkChecksum chunkChecksum)
The checksum strategy used for chunk checksum.
|
EnvironmentBuilder |
clientProperties(Map<String,String> clientProperties)
Custom client properties to add to default client properties.
|
EnvironmentBuilder |
clientProperty(String key,
String value)
Add a custom client properties to default client properties.
|
EnvironmentBuilder |
codec(Codec codec)
The AMQP 1.0 codec used to encode and decode AMQP 1.0 messages.
|
EnvironmentBuilder |
compressionCodecFactory(CompressionCodecFactory compressionCodecFactory) |
EnvironmentBuilder |
credentialsProvider(CredentialsProvider credentialsProvider)
The
CredentialsProvider to use. |
EnvironmentBuilder |
eventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
The Netty
EventLoopGroup instance to use. |
EnvironmentBuilder |
host(String host)
The host to connect to.
|
EnvironmentBuilder |
lazyInitialization(boolean lazy)
To delay the connection opening until necessary.
|
EnvironmentBuilder |
maxConsumersByConnection(int maxConsumersByConnection)
The maximum number of consumers allocated to a single connection.
|
EnvironmentBuilder |
maxProducersByConnection(int maxProducersByConnection)
The maximum number of producers allocated to a single connection.
|
EnvironmentBuilder |
maxTrackingConsumersByConnection(int maxTrackingConsumersByConnection)
The maximum number of tracking consumers allocated to a single connection.
|
EnvironmentBuilder |
metricsCollector(MetricsCollector metricsCollector)
Set up a
MetricsCollector. |
EnvironmentBuilder |
password(String password)
The password to use.
|
EnvironmentBuilder |
port(int port)
The port to use to connect.
|
EnvironmentBuilder |
recoveryBackOffDelayPolicy(BackOffDelayPolicy recoveryBackOffDelayPolicy)
The
BackOffDelayPolicy to use for connection recovery. |
EnvironmentBuilder |
requestedHeartbeat(Duration requestedHeartbeat)
The hearbeat to request.
|
EnvironmentBuilder |
requestedMaxFrameSize(int requestedMaxFrameSize)
The maximum frame size to request.
|
EnvironmentBuilder |
rpcTimeout(Duration timeout)
Timeout for RPC calls.
|
EnvironmentBuilder |
saslConfiguration(SaslConfiguration saslConfiguration)
The SASL configuration to use.
|
EnvironmentBuilder |
scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Set the
ScheduledExecutorService used to:
Schedule producers batch sending
Handle connection recovery
Handle topology update
|
EnvironmentBuilder.TlsConfiguration |
tls()
Enable and configure TLS.
|
EnvironmentBuilder |
topologyUpdateBackOffDelayPolicy(BackOffDelayPolicy topologyUpdateBackOffDelayPolicy)
The
BackOffDelayPolicy to use for topology recovery. |
EnvironmentBuilder |
uri(String uri)
The URI of a node to connect to.
|
EnvironmentBuilder |
uris(List<String> uris)
A list of URIs of nodes of the same cluster to use to connect to.
|
EnvironmentBuilder |
username(String username)
The username to use.
|
EnvironmentBuilder |
virtualHost(String virtualHost)
The virtual host to connect to.
|
EnvironmentBuilder uri(String uri)
URI must be of the form rabbitmq-stream://guest:guest@localhost:5552/%2f.
uri - EnvironmentBuilder uris(List<String> uris)
URIs must be of the form rabbitmq-stream://guest:guest@localhost:5552/%2f.
uris - EnvironmentBuilder addressResolver(AddressResolver addressResolver)
AddressResolver to potentially change resolved node address to connect to.
Applications can use this abstraction to make sure connection attempts ignore metadata hints and always go to a single point like a load balancer.
addressResolver - EnvironmentBuilder host(String host)
host - EnvironmentBuilder port(int port)
port - EnvironmentBuilder codec(Codec codec)
codec - EnvironmentBuilder eventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
EventLoopGroup instance to use.
The environment uses its own instance by default. It is the developer's responsibility to
close the EventLoopGroup they provide.
eventLoopGroup - EnvironmentBuilder byteBufAllocator(io.netty.buffer.ByteBufAllocator byteBufAllocator)
EnvironmentBuilder compressionCodecFactory(CompressionCodecFactory compressionCodecFactory)
EnvironmentBuilder rpcTimeout(Duration timeout)
Default is 10 seconds.
timeout - EnvironmentBuilder saslConfiguration(SaslConfiguration saslConfiguration)
saslConfiguration - credentialsProvider(CredentialsProvider)EnvironmentBuilder credentialsProvider(CredentialsProvider credentialsProvider)
CredentialsProvider to use.credentialsProvider - saslConfiguration(SaslConfiguration)EnvironmentBuilder username(String username)
username - EnvironmentBuilder password(String password)
password - EnvironmentBuilder virtualHost(String virtualHost)
virtualHost - EnvironmentBuilder requestedHeartbeat(Duration requestedHeartbeat)
Default is 60 seconds.
requestedHeartbeat - EnvironmentBuilder requestedMaxFrameSize(int requestedMaxFrameSize)
Default is 1048576.
requestedMaxFrameSize - EnvironmentBuilder channelCustomizer(ChannelCustomizer channelCustomizer)
Channels used for connection.channelCustomizer - EnvironmentBuilder chunkChecksum(ChunkChecksum chunkChecksum)
The default is CRC32 based on JDK implementation.
chunkChecksum - EnvironmentBuilder clientProperties(Map<String,String> clientProperties)
clientProperties - EnvironmentBuilder clientProperty(String key, String value)
key - value - EnvironmentBuilder metricsCollector(MetricsCollector metricsCollector)
MetricsCollector.metricsCollector - EnvironmentBuilder maxProducersByConnection(int maxProducersByConnection)
Default is 256, which is the maximum value.
maxProducersByConnection - EnvironmentBuilder maxTrackingConsumersByConnection(int maxTrackingConsumersByConnection)
Default is 50, which is the maximum value.
maxTrackingConsumersByConnection - EnvironmentBuilder maxConsumersByConnection(int maxConsumersByConnection)
Default is 256, which is the maximum value.
maxConsumersByConnection - EnvironmentBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
ScheduledExecutorService used to:
scheduledExecutorService - the service to useEnvironmentBuilder recoveryBackOffDelayPolicy(BackOffDelayPolicy recoveryBackOffDelayPolicy)
BackOffDelayPolicy to use for connection recovery.
The default is a fixed delay of 5 seconds.
recoveryBackOffDelayPolicy - EnvironmentBuilder topologyUpdateBackOffDelayPolicy(BackOffDelayPolicy topologyUpdateBackOffDelayPolicy)
BackOffDelayPolicy to use for topology recovery.
Topology recovery can kick in when streams leaders and replicas move from nodes to nodes in the cluster.
The default is a fixed delay of 5 seconds.
topologyUpdateBackOffDelayPolicy - EnvironmentBuilder lazyInitialization(boolean lazy)
No connection will be open before it is necessary (for stream management or producer/consumer creation).
Default is false.
lazy - Environment build()
Environment instance.EnvironmentBuilder.TlsConfiguration tls()
Copyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.