Tuple Topic

note

Tuple Topics cannot be defined via configuration properties.

Java Configuration

TupleTopicDescription is used to create an ITupleTopic.

TupleTopicDescription Spring Beans will also be picked up as configuration for the DLC.

TupleTopicDescription
Parameter Required Type Default Description
name Y String Name of the topic.
tupleSupplier Y Function<DlcOperationScope, Collection<Object[]>> The tuple supplier.
headers List<String> The headers of the tuples provided by supplier.
channels Set<Channel> A channel is created using the topic’s name as the name of the target. Channels
restrictToSources Set<String> Sources to which the topic restricted.
restrictFromSources Set<String> Sources from which the topic is restricted.

Example

@Bean
public TupleTopicDescription tupleTopic() {
    return TupleTopicDescription.builder("trades", this::generateTuples)
            .build();
}