zoukankan      html  css  js  c++  java
  • RabbitMQ source was instantiated with usesCorrelationId set to true but a message was received with correlation id set to null

    报错信息:

    java.lang.NullPointerException: RabbitMQ source was instantiated with usesCorrelationId set to true but a message was received with correlation id set to null!
        at org.apache.flink.util.Preconditions.checkNotNull(Preconditions.java:75)
        at org.apache.flink.streaming.connectors.rabbitmq.RMQSource.run(RMQSource.java:229)
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:100)
        at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:63)
        at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:201)

    我的配置信息

    DataStreamSource<String> dataStreamSource = env.addSource(new RMQSource<>(connectionConfig,
                    "info",
                    true,
                    new SimpleStringSchema()))
                    .setParallelism(1);

    第二个参数是 是否需要usesCorrellationId,一个标志发送的信息是否唯一的确认字段,如果是true,则在发送的时候必须携带这个字段

    改成false就行了

  • 相关阅读:
    PHP框架 CI与TP之MVC比较
    多线程设计要点
    BigPipe 的工作原理
    Linux yum命令的使用技巧
    java 乱码问题
    win7或xp下常用命令
    不同场景下JVM参数的设置
    win7笔记本创建wifi热点
    maven编译出现Java heap space
    Curling 2.0——蛋疼的一道题
  • 原文地址:https://www.cnblogs.com/yangchas/p/13600817.html
Copyright © 2011-2022 走看看