Stream

Stream

Scheme: stream
Name Kind Type Required Deprecated Default Value Enum Values Description
url path java.lang.String true false When using the stream:url URI format, this option specifies the URL to stream to/from. The input/output stream will be opened using the JDK URLConnection facility.
fileName parameter java.lang.String false When using the stream:file URI format, this option specifies the filename to stream to/from.
scanStream parameter boolean false To be used for continuously reading a stream such as the unix tail command.
retry parameter boolean false Will retry opening the file if it's overwritten, somewhat like tail --retry
closeOnDone parameter boolean false This option is used in combination with Splitter and streaming to the same file. The idea is to keep the stream open and only close when the Splitter is done, to improve performance. Mind this requires that you only stream to the same file, and not 2 or more files.
scanStreamDelay parameter long false Delay in milliseconds between read attempts when using scanStream.
delay parameter long false Initial delay in milliseconds before producing the stream.
encoding parameter java.lang.String false You can configure the encoding (is a charset name) to use text-based streams (for example, message body is a String object). If not provided, Camel uses the JVM default Charset.
promptMessage parameter java.lang.String false Message prompt to use when reading from stream:in; for example, you could set this to Enter a command:
promptDelay parameter long false Optional delay in milliseconds before showing the message prompt.
initialPromptDelay parameter long false 2000 Initial delay in milliseconds before showing the message prompt. This delay occurs only once. Can be used during system startup to avoid message prompts being written while other logging is done to the system out.
groupLines parameter int false To group X number of lines in the consumer. For example to group 10 lines and therefore only spit out an Exchange with 10 lines, instead of 1 Exchange per line.
autoCloseCount parameter int false Number of messages to process before closing stream on Producer side. Never close stream by default (only when Producer is stopped). If more messages are sent, the stream is reopened for another autoCloseCount batch.
groupStrategy parameter org.apache.camel.component.stream.GroupStrategy false Allows to use a custom GroupStrategy to control how to group lines.
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter boolean false false Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

stream consumer

Consumer that can read from streams