You have to implement a SerializationSchema<myObject> and pass that into the FlinkKinesisProducer.

The error message you received is caused by the compiler attempting to determine the generic type of the producer, but not being able to do so since your myObject class does not implement the correct interface.

On 01/10/2019 20:59, Andres Angel wrote:
Hello folks,

I need to create a flink producer for Kinesis capable to sink a payload based on a custom class object I have build. The official documentation comes with this basic example assuming that we are sinking a string object:

|FlinkKinesisProducer<String> kinesis = new FlinkKinesisProducer<>(new SimpleStringSchema(), producerConfig);| Based on that example I tried to implement my custom producer in the way that I will return the need object.

|FlinkKinesisProducer<myObject> kinesis = new FlinkKinesisProducer<>(new myObject(), producerConfig);| The problem with this approach is that I get an error right on the FlinkKinesisProducer*<> *saying that it's *incapable to infer arguments*

How would be the rightly way to sink this custom payload object?

thanks so much


Reply via email to