Class SpringPulsarBinderSampleApp

java.lang.Object
org.springframework.pulsar.sample.binder.SpringPulsarBinderSampleApp

@SpringBootApplication public class SpringPulsarBinderSampleApp extends Object
This sample binder app has an extra consumer that is equipped with Pulsar's DLT feature - timeLoggerToDlt. However, this consumer is not part of the spring.cloud.function.definition. In order to enable this, add the function timeLoggerToDlt to the definition in the application.yml file. When doing this, in order to minimize verbose output and just to focus on the DLT feature, comment out the regular supplier below (timeSupplier) and then un-comment the ApplicationRunner below. The runner only sends a single message whereas the supplier sends a message every second.
Author:
Soby Chacko
  • Constructor Details

    • SpringPulsarBinderSampleApp

      public SpringPulsarBinderSampleApp()
  • Method Details

    • main

      public static void main(String[] args)
    • timeSupplier

      @Bean public Supplier<org.springframework.pulsar.sample.binder.SpringPulsarBinderSampleApp.Time> timeSupplier()
    • timeProcessor

      @Bean public Function<org.springframework.pulsar.sample.binder.SpringPulsarBinderSampleApp.Time,org.springframework.pulsar.sample.binder.SpringPulsarBinderSampleApp.EnhancedTime> timeProcessor()
    • timeLogger

      @Bean public Consumer<org.springframework.pulsar.sample.binder.SpringPulsarBinderSampleApp.EnhancedTime> timeLogger()
    • timeLoggerToDlt

      @Bean public Consumer<org.springframework.pulsar.sample.binder.SpringPulsarBinderSampleApp.EnhancedTime> timeLoggerToDlt()