org.apache.kafka.common.errors.UnsupportedVersionException:代理不支持CREATE_PARTITIONS

时间:2018-04-20 02:56:11

标签: java apache-kafka spring-kafka

当我启动包含kafka的spring spring stream应用程序时,我遇到了这个错误,它意味着什么以及如何解决这个问题?

ps:我有另一个使用相同中间件kafka的项目,它可以正常工作。

这是我的pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.gyfg.zttest</groupId>
    <artifactId>zttest-stream-task</artifactId>
    <packaging>jar</packaging>

    <name>zttest-stream-task</name>
    <description>zttestproject for stream listener</description>

    <parent>
        <groupId>com.gyfg</groupId>
        <artifactId>zttest</artifactId>
        <version>1.0.0</version>
    </parent>

    <properties>
        <start-class>com.gyfg.zttest.streamtask.TypeConversionApplication</start-class>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>logback-classic</artifactId>
                    <groupId>ch.qos.logback</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-stream-binder-kafka-streams</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-stream-binder-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>3.5.0</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>zttest-stream-task</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <!-- <configuration> <classifier>exec</classifier> </configuration> -->
            </plugin>
        </plugins>
        <defaultGoal>package</defaultGoal>
    </build>

</project>

这是我的application.yml:

server:
  port: 8082
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
spring:
  application:
    name: zttest-stream-task
  cloud:
    stream:
      default:
          consumer:
            concurrency: 3
            resetOffsets: true
            auto:
              offset:
                reset: latest
      bindings:
        syslogin_channel:
          destination: SysLog
          group: SysLog
        businesslogin_channel:
          destination: BusinessLog
          group: BusinessLog
      kafka:
          binder:
              zk-nodes: localhost:2181
              brokers:  localhost:9092
              autoAddPartitions: true
              resetOffsets: true
              startOffset: latest
  redis:
    database: 3
    host: localhost
    port: 6379
    password: 
    timeout: 10000

Kafka version : 1.1.0这可以在我的eclipse控制台中找到。

0 个答案:

没有答案