Github user yew1eb commented on the issue:

    https://github.com/apache/flink/pull/4694
  
    Hey @tzulitai, The 4.2.0 version does not bring any other dependencies, we 
can safely upgrade.
    
    ```
    [INFO] |  +- org.apache.flink:flink-shaded-guava:jar:18.0-1.0:provided
    [INFO] |  +- org.apache.commons:commons-math3:jar:3.5:provided
    [INFO] |  \- 
org.apache.sling:org.apache.sling.commons.json:jar:2.0.6:provided
    [INFO] +- com.rabbitmq:amqp-client:jar:4.2.0:compile
    [INFO] +- 
org.apache.flink:flink-streaming-java_2.11:test-jar:tests:1.4-SNAPSHOT:test
    [INFO] +- 
org.apache.flink:flink-runtime_2.11:test-jar:tests:1.4-SNAPSHOT:test
    [INFO] |  +- org.apache.flink:flink-java:jar:1.4-SNAPSHOT:provided
    [INFO] |  +- org.apache.flink:flink-shaded-hadoop2:jar:1.4-SNAPSHOT:provided
    ```
    
    
    ## Check RabbitMQ Sink & Source
    
    ### Start a RabbitMQ(3.6.12)server on docker.
    ```
    docker run -d --name rabbitmq --publish 5671:5671 \
     --publish 5672:5672 --publish 4369:4369 --publish 25672:25672 --publish 
15671:15671 --publish 15672:15672 \
    rabbitmq:management
    ```
    
    
    ### WriteRabbitMQ job
    ```
            final RMQConnectionConfig connectionConfig = new 
RMQConnectionConfig.Builder()
                    .setHost("localhost")
                    .setPort(5672)
                    .setVirtualHost("flink")
                    .setPassword("guest")
                    .setUserName("guest")
                    .build();
    
            DataStream<String> tsSource = env.addSource(
                    new SimpleStringGenerator(500));
    
            tsSource.addSink(new RMQSink<String>(
                    connectionConfig,            // config for the RabbitMQ 
connection
                    "flink",                 // name of the RabbitMQ queue to 
send messages to
                    new SimpleStringSchema()));
    
    ```
    ### ReadRabbitMQ job
     ```
           final RMQConnectionConfig connectionConfig = new 
RMQConnectionConfig.Builder()
                    .setHost("localhost")
                    .setPort(5672)
                    .setVirtualHost("flink")
                    .setPassword("guest")
                    .setUserName("guest")
                    .build();
    
            DataStream<String> tsSource = env.addSource(new 
RMQSource<String>(connectionConfig, "flink",                 // name of the 
RabbitMQ queue to send messages to
                    false, new SimpleStringSchema()));
    
            tsSource.addSink(new PrintSinkFunction<String>());
    
    ```
    
    I observed rabbitmq admin UI and flink UI, the message was normally 
received and sent, no exception log.



---

Reply via email to