Channel
Configuration Properties
Properties for the Channel are provided inside the configuration of a Topic.
Key | Required | Type | Default | Description |
---|---|---|---|---|
target-name | Y | String |
Name of the target (a Sink or Store name). | |
custom-fields | Set<String> |
Set of names of the Column Calculators. | ||
accumulate | boolean |
false | If enabled, the messages will accumulate all of their tuples (from all the message chunks) and only publish them to the transaction manager when the message is sent. |
YAML Example
dlc:
csv:
topics:
topic1:
channels:
- target-name: sink1
custom-fields:
- calculator1
- calculator2
- calculator3
- calculator4
- calculator5
Java Configuration
ChannelDescription
Java object can be used for configuration in Java. The Object is used in the configuration of a
Topic.
You can use NamedEntityResolverService
to get Sink or Column Calculator by name.
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sinkDescription | Y | ISinkDescription |
The Sink associated with this channel. | |
customFields | Set<IColumnCalculatorDescription> |
Set of Column Calculators which belong to the channel. | ||
accumulate | boolean |
false | If enabled, the messages will accumulate all of their tuples (from all the message chunks) and only publish them to the transaction manager when the message is sent. |
Java Example
@Bean
public CsvTopicDescription topic1(NamedEntityResolverService namedEntityResolver) {
return CsvTopicDescription.builder("topic1", "glob:file*.csv")
.channel(ChannelDescription.builder(namedEntityResolver.getDlcSinkDescription("sink1"))
.customFields(
Set.of(
new ColumnCalculatorDescription(
"Calculator1",
scope -> new ConstantCalculator<>("field1", 1)
),
new AnonymousColumnCalculatorDescription(
scope -> new ConstantCalculator<>("field1", scope.get("constant"))
)
)
)
.build())
.build();
}