3030import org .springframework .pulsar .annotation .PulsarListener ;
3131
3232/**
33- * This sample binder app has an extra consumer that is equipped with Pulsar's DLT feature - timeLoggerToDlt.
34- * However, this consumer is not part of the spring.cloud.function.definition.
35- * In order to enable this, add the function timeLoggerToDlt to the definition in the application.yml file.
36- * When doing this, in order to minimize verbose output and just to focus on the DLT feature, comment out the
33+ * This sample binder app has an extra consumer that is equipped with Pulsar's DLT feature
34+ * - timeLoggerToDlt. However, this consumer is not part of the
35+ * spring.cloud.function.definition. In order to enable this, add the function
36+ * timeLoggerToDlt to the definition in the application.yml file. When doing this, in
37+ * order to minimize verbose output and just to focus on the DLT feature, comment out the
3738 * regular supplier below (timeSupplier) and then un-comment the ApplicationRunner below.
38- * The runner only sends a single message whereas the supplier sends a message every second.
39+ * The runner only sends a single message whereas the supplier sends a message every
40+ * second.
3941 *
4042 * @author Soby Chacko
4143 */
@@ -53,17 +55,18 @@ public Supplier<Time> timeSupplier() {
5355 return () -> new Time (String .valueOf (System .currentTimeMillis ()));
5456 }
5557
56- // @Bean
57- // ApplicationRunner runner(PulsarTemplate<Time> pulsarTemplate) {
58- //
59- // String topic = "timeSupplier-out-0";
60- //
61- // return args -> {
62- // for (int i = 0; i < 1; i++) {
63- // pulsarTemplate.send(topic, new Time(String.valueOf(System.currentTimeMillis())), Schema.JSON(Time.class));
64- // }
65- // };
66- // }
58+ // @Bean
59+ // ApplicationRunner runner(PulsarTemplate<Time> pulsarTemplate) {
60+ //
61+ // String topic = "timeSupplier-out-0";
62+ //
63+ // return args -> {
64+ // for (int i = 0; i < 1; i++) {
65+ // pulsarTemplate.send(topic, new Time(String.valueOf(System.currentTimeMillis())),
66+ // Schema.JSON(Time.class));
67+ // }
68+ // };
69+ // }
6770
6871 @ Bean
6972 public Function <Time , EnhancedTime > timeProcessor () {
0 commit comments