You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Aleksandr Salatich (JIRA)" <ji...@apache.org> on 2019/02/19 15:30:00 UTC

[jira] [Commented] (FLINK-11320) Support user callback in Kafka sink

    [ https://issues.apache.org/jira/browse/FLINK-11320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16772020#comment-16772020 ] 

Aleksandr Salatich commented on FLINK-11320:
--------------------------------------------

[~allenxwang] is it actual task? Is it OK for beginner in flink? Thanks in advance for answer.

> Support user callback in Kafka sink
> -----------------------------------
>
>                 Key: FLINK-11320
>                 URL: https://issues.apache.org/jira/browse/FLINK-11320
>             Project: Flink
>          Issue Type: Improvement
>          Components: Kafka Connector
>            Reporter: Allen Wang
>            Priority: Major
>
> We would like to get notified when Flink's Kafka sink successfully produces a message to the Kafka cluster for message tracing purposes. The callback should be created for the specific item being produced. Currently this functionality is inside Flink's internal code and not accessible to the user. 
> This change would allow user to get callback when a message is produced in the sink:
>  * Add a new interface {{UserCallbackFactory}}:
> {code:java}
> public interface UserCallbackFactory<IN> {
>     Callback create(IN next);
> }{code}
>  * Add new constructor in {{FlinkKafkaProducer}} to pass in an optional argument of {{UserCallbackFactory}}
>  * In the  {{FlinkKafkaProducer.invoke}} method, create a user callback given the produced item and invoke this callback.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)