Reroute messages in DLQ to process again on a rest call

58 Views Asked by At

I am using spring cloud stream function with kafka bindings to process my messages. I have also configured my DLQ like this

spring:
  application:
    name: app
  cloud:
    stream:
      default:
        group: abs
      function.definition: abc|def|ghi
      kafka:
        binder:
        
        bindings:
          abcdefghi-in-0:
            consumer:
              enable-dlq: true
              dlq-name: a.b.c.deadletter
              dlq-producer-properties:
                configuration:
                  schema.registry.url: ${kafka.schema.registry.url}
                  key.serializer: org.apache.kafka.common.serialization.ByteArraySerializer
                  value.serializer: io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializer
          
      bindings:
        abcdefghi-in-0:
          destination: a.b.c.in
          content-type: application/x-protobuf

And I have 3 java.util.functions to process the message one after the other as per the configuration.

I am trying to put the messages in the DLQ-a.b.c.deadletter back to input such a way that this message will be again processed by my 3 functions again. How can I do this upon a rest call?

I was looking at this, but I don't want to use @StreamListener(Processor.INPUT) as it is deprecated and also I wanted it to be triggered from a rest call.

0

There are 0 best solutions below