IN - public class RMQSink<IN>
extends org.apache.flink.streaming.api.functions.sink.RichSinkFunction<IN>
| Constructor and Description |
|---|
RMQSink(RMQConnectionConfig rmqConnectionConfig,
String queueName,
org.apache.flink.streaming.util.serialization.SerializationSchema<IN> schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
invoke(IN value)
Called when new data arrives to the sink, and forwards it to RMQ.
|
void |
open(org.apache.flink.configuration.Configuration config) |
void |
setLogFailuresOnly(boolean logFailuresOnly)
Defines whether the producer should fail on errors, or only log them.
|
public RMQSink(RMQConnectionConfig rmqConnectionConfig, String queueName, org.apache.flink.streaming.util.serialization.SerializationSchema<IN> schema)
rmqConnectionConfig - The RabbitMQ connection configuration RMQConnectionConfig.queueName - The queue to publish messages to.schema - A SerializationSchema for turning the Java objects received into bytespublic void setLogFailuresOnly(boolean logFailuresOnly)
logFailuresOnly - The flag to indicate logging-only on exceptions.public void open(org.apache.flink.configuration.Configuration config)
throws Exception
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void invoke(IN value)
public void close()
close in interface org.apache.flink.api.common.functions.RichFunctionclose in class org.apache.flink.api.common.functions.AbstractRichFunctionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.