0

I've a kafka configuration inside of my yaml file and for one input I'm adding multiple topics with different name. I want 3 of them to have 5 partitions and one of them must have 1 partition. How can I set it in my configuration file separately? Kafka version is old and it can't create partitions automatically so I need to make them manually.

spring:
  cloud:
    stream:
      default:
        group: xxxx
        consumer:
          partitioned: true
          concurrency: 5
      kafka:
        binder:
          configuration:
            max.poll.interval.ms: 100000
            max.poll.records: 100
          brokers: xx.xx.xx.xx
          defaultBrokerPort: 8080
          replicationFactor: 1
      function:
        definition: methodName
      bindings:
        methodName-in-0:
          destination: topic1, topic2, topic3, topic4
2
  • Spring-Kafka can use @Bean NewTopic methods for this. Commented Dec 23, 2022 at 17:28
  • Kafka version is old and it can't create partitions automatically - Brokers have always been able to auto-create topics with num.partitions defined in server.properties. But if you want different value of partitions, then you always needed to create manually. Version therefore doesn't matter Commented Dec 23, 2022 at 17:31

1 Answer 1

1

I solved this issue with decreasing default partition count 5 to 1. Somehow because of kafka version it can't decrease partition count but it can increase it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.