Package org.apache.camel.component.nats
Class NatsConfiguration
- java.lang.Object
-
- org.apache.camel.component.nats.NatsConfiguration
-
@UriParams public class NatsConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description NatsConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.nats.client.Options.BuildercreateOptions()io.nats.client.ConnectiongetConnection()Reference an already instantiated connection to Nats serverintgetConnectionTimeout()Timeout for connection attempts.intgetFlushTimeout()org.apache.camel.spi.HeaderFilterStrategygetHeaderFilterStrategy()Get the header filter strategyStringgetMaxMessages()Stop receiving messages from a topic we are subscribing to after maxMessagesintgetMaxPingsOut()maximum number of pings have not received a response allowed by the clientintgetMaxReconnectAttempts()Max reconnection attemptsintgetPingInterval()Ping interval to be aware if connection is still alive (in milliseconds)intgetPoolSize()Consumer thread pool size (default is 10)StringgetQueueName()The Queue name if we are using nats for a queue configurationintgetReconnectTimeWait()Waiting time before attempts reconnection (in milliseconds)StringgetReplySubject()the subject to which subscribers should send responseintgetRequestCleanupInterval()Interval to clean up cancelled/timed out requests.longgetRequestTimeout()StringgetServers()URLs to one or more NAT servers.org.apache.camel.support.jsse.SSLContextParametersgetSslContextParameters()To configure security using SSLContextParametersStringgetTopic()The name of topic we want to usebooleanisFlushConnection()booleanisNoEcho()Turn off echo.booleanisNoRandomizeServers()Whether or not randomizing the order of servers for the connection attemptsbooleanisPedantic()Whether or not running in pedantic mode (this affects performance)booleanisReconnect()Whether or not using reconnection featurebooleanisReplyToDisabled()booleanisSecure()Set secure option indicating TLS is requiredbooleanisTraceConnection()Whether or not connection trace messages should be printed to standard out for fine grained debugging of connection issues.booleanisVerbose()Whether or not running in verbose modevoidsetConnection(io.nats.client.Connection connection)voidsetConnectionTimeout(int connectionTimeout)voidsetFlushConnection(boolean flushConnection)Define if we want to flush connection when stopping or notvoidsetFlushTimeout(int flushTimeout)Set the flush timeout (in milliseconds)voidsetHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)Define the header filtering strategyvoidsetMaxMessages(String maxMessages)voidsetMaxPingsOut(int maxPingsOut)voidsetMaxReconnectAttempts(int maxReconnectAttempts)voidsetNoEcho(boolean noEcho)voidsetNoRandomizeServers(boolean noRandomizeServers)voidsetPedantic(boolean pedantic)voidsetPingInterval(int pingInterval)voidsetPoolSize(int poolSize)voidsetQueueName(String queueName)voidsetReconnect(boolean reconnect)voidsetReconnectTimeWait(int reconnectTimeWait)voidsetReplySubject(String replySubject)voidsetReplyToDisabled(boolean replyToDisabled)Can be used to turn off sending back reply message in the consumer.voidsetRequestCleanupInterval(int requestCleanupInterval)voidsetRequestTimeout(long requestTimeout)Request timeout in millisecondsvoidsetSecure(boolean secure)voidsetServers(String servers)voidsetSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)voidsetTopic(String topic)voidsetTraceConnection(boolean traceConnection)voidsetVerbose(boolean verbose)
-
-
-
Method Detail
-
getServers
public String getServers()
URLs to one or more NAT servers. Use comma to separate URLs when specifying multiple servers.
-
setServers
public void setServers(String servers)
-
getTopic
public String getTopic()
The name of topic we want to use
-
setTopic
public void setTopic(String topic)
-
getConnection
public io.nats.client.Connection getConnection()
Reference an already instantiated connection to Nats server
-
setConnection
public void setConnection(io.nats.client.Connection connection)
-
isReconnect
public boolean isReconnect()
Whether or not using reconnection feature
-
setReconnect
public void setReconnect(boolean reconnect)
-
isPedantic
public boolean isPedantic()
Whether or not running in pedantic mode (this affects performance)
-
setPedantic
public void setPedantic(boolean pedantic)
-
isVerbose
public boolean isVerbose()
Whether or not running in verbose mode
-
setVerbose
public void setVerbose(boolean verbose)
-
getReconnectTimeWait
public int getReconnectTimeWait()
Waiting time before attempts reconnection (in milliseconds)
-
setReconnectTimeWait
public void setReconnectTimeWait(int reconnectTimeWait)
-
getMaxReconnectAttempts
public int getMaxReconnectAttempts()
Max reconnection attempts
-
setMaxReconnectAttempts
public void setMaxReconnectAttempts(int maxReconnectAttempts)
-
getMaxPingsOut
public int getMaxPingsOut()
maximum number of pings have not received a response allowed by the client
-
setMaxPingsOut
public void setMaxPingsOut(int maxPingsOut)
-
getRequestCleanupInterval
public int getRequestCleanupInterval()
Interval to clean up cancelled/timed out requests.
-
setRequestCleanupInterval
public void setRequestCleanupInterval(int requestCleanupInterval)
-
setRequestTimeout
public void setRequestTimeout(long requestTimeout)
Request timeout in milliseconds
-
getRequestTimeout
public long getRequestTimeout()
-
getPingInterval
public int getPingInterval()
Ping interval to be aware if connection is still alive (in milliseconds)
-
setPingInterval
public void setPingInterval(int pingInterval)
-
getConnectionTimeout
public int getConnectionTimeout()
Timeout for connection attempts. (in milliseconds)
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
-
getReplySubject
public String getReplySubject()
the subject to which subscribers should send response
-
setReplySubject
public void setReplySubject(String replySubject)
-
isNoRandomizeServers
public boolean isNoRandomizeServers()
Whether or not randomizing the order of servers for the connection attempts
-
setNoRandomizeServers
public void setNoRandomizeServers(boolean noRandomizeServers)
-
isNoEcho
public boolean isNoEcho()
Turn off echo. If supported by the gnatsd version you are connecting to this flag will prevent the server from echoing messages back to the connection if it has subscriptions on the subject being published to.
-
setNoEcho
public void setNoEcho(boolean noEcho)
-
getQueueName
public String getQueueName()
The Queue name if we are using nats for a queue configuration
-
setQueueName
public void setQueueName(String queueName)
-
isReplyToDisabled
public boolean isReplyToDisabled()
-
setReplyToDisabled
public void setReplyToDisabled(boolean replyToDisabled)
Can be used to turn off sending back reply message in the consumer.
-
getMaxMessages
public String getMaxMessages()
Stop receiving messages from a topic we are subscribing to after maxMessages
-
setMaxMessages
public void setMaxMessages(String maxMessages)
-
getPoolSize
public int getPoolSize()
Consumer thread pool size (default is 10)
-
setPoolSize
public void setPoolSize(int poolSize)
-
isFlushConnection
public boolean isFlushConnection()
-
setFlushConnection
public void setFlushConnection(boolean flushConnection)
Define if we want to flush connection when stopping or not
-
getFlushTimeout
public int getFlushTimeout()
-
setFlushTimeout
public void setFlushTimeout(int flushTimeout)
Set the flush timeout (in milliseconds)
-
isSecure
public boolean isSecure()
Set secure option indicating TLS is required
-
setSecure
public void setSecure(boolean secure)
-
getHeaderFilterStrategy
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
Get the header filter strategy
-
setHeaderFilterStrategy
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
Define the header filtering strategy
-
getSslContextParameters
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
To configure security using SSLContextParameters
-
setSslContextParameters
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
-
createOptions
public io.nats.client.Options.Builder createOptions() throws NoSuchAlgorithmException, IllegalArgumentException
-
isTraceConnection
public boolean isTraceConnection()
Whether or not connection trace messages should be printed to standard out for fine grained debugging of connection issues.
-
setTraceConnection
public void setTraceConnection(boolean traceConnection)
-
-