daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest May 16th, 2018 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. final DataStream<ObjectNode> inputStream = env
  2.         .addSource(new RMQSource<ObjectNode>(
  3.             connectionConfig,                   // config for the RabbitMQ connection
  4.             "start",                            // name of the RabbitMQ queue to consume
  5.             true,                               // use correlation ids; can be false if only at-least-once is required
  6.             new JSONDeserializationSchema()))   // deserialization schema to turn messages into Java objects
  7.         .setParallelism(1);                     // non-parallel source is only required for exactly-once
  8.    
  9. stream.addSink(new RMQSink<ObjectNode>(
  10.             connectionConfig,
  11.             "stop",
  12.             new JSONSerializationSchema()
  13.         ));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top