Package org.apache.camel.component.nats
Class NatsConfiguration
java.lang.Object
org.apache.camel.component.nats.NatsConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.nats.client.Options.Builder
io.nats.client.Connection
Reference an already instantiated connection to Nats serverint
Timeout for connection attempts.int
org.apache.camel.spi.HeaderFilterStrategy
Get the header filter strategyStop receiving messages from a topic we are subscribing to after maxMessagesint
maximum number of pings have not received a response allowed by the clientint
Max reconnection attemptsint
Ping interval to be aware if connection is still alive (in milliseconds)int
Consumer thread pool size (default is 10)The Queue name if we are using nats for a queue configurationint
Waiting time before attempts reconnection (in milliseconds)the subject to which subscribers should send responseint
Interval to clean up cancelled/timed out requests.long
URLs to one or more NAT servers.org.apache.camel.support.jsse.SSLContextParameters
To configure security using SSLContextParametersgetTopic()
The name of topic we want to useboolean
boolean
isNoEcho()
Turn off echo.boolean
Whether or not randomizing the order of servers for the connection attemptsboolean
Whether or not running in pedantic mode (this affects performance)boolean
Whether or not using reconnection featureboolean
boolean
isSecure()
Set secure option indicating TLS is requiredboolean
Whether or not connection trace messages should be printed to standard out for fine grained debugging of connection issues.boolean
Whether or not running in verbose modevoid
setConnection
(io.nats.client.Connection connection) void
setConnectionTimeout
(int connectionTimeout) void
setFlushConnection
(boolean flushConnection) Define if we want to flush connection when stopping or notvoid
setFlushTimeout
(int flushTimeout) Set the flush timeout (in milliseconds)void
setHeaderFilterStrategy
(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) Define the header filtering strategyvoid
setMaxMessages
(String maxMessages) void
setMaxPingsOut
(int maxPingsOut) void
setMaxReconnectAttempts
(int maxReconnectAttempts) void
setNoEcho
(boolean noEcho) void
setNoRandomizeServers
(boolean noRandomizeServers) void
setPedantic
(boolean pedantic) void
setPingInterval
(int pingInterval) void
setPoolSize
(int poolSize) void
setQueueName
(String queueName) void
setReconnect
(boolean reconnect) void
setReconnectTimeWait
(int reconnectTimeWait) void
setReplySubject
(String replySubject) void
setReplyToDisabled
(boolean replyToDisabled) Can be used to turn off sending back reply message in the consumer.void
setRequestCleanupInterval
(int requestCleanupInterval) void
setRequestTimeout
(long requestTimeout) Request timeout in millisecondsvoid
setSecure
(boolean secure) void
setServers
(String servers) void
setSslContextParameters
(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) void
void
setTraceConnection
(boolean traceConnection) void
setVerbose
(boolean verbose)
-
Constructor Details
-
NatsConfiguration
public NatsConfiguration()
-
-
Method Details
-
getServers
URLs to one or more NAT servers. Use comma to separate URLs when specifying multiple servers. -
setServers
-
getTopic
The name of topic we want to use -
setTopic
-
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
the subject to which subscribers should send response -
setReplySubject
-
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
The Queue name if we are using nats for a queue configuration -
setQueueName
-
isReplyToDisabled
public boolean isReplyToDisabled() -
setReplyToDisabled
public void setReplyToDisabled(boolean replyToDisabled) Can be used to turn off sending back reply message in the consumer. -
getMaxMessages
Stop receiving messages from a topic we are subscribing to after maxMessages -
setMaxMessages
-
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)
-