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

Erik van Oosten edited comment on FLINK-6928 at 6/15/17 6:39 PM:
-----------------------------------------------------------------

In my ideal world method {{getTargetTopic}} would be removed from 
{{*SerializationSchema}} and moved to a new interface, e.g. 
{{DestinationTopic}}.
Then there are two constructor variants for {{FlinkKafkaProducer}}: one would 
take a topic ({{String}}), the other would take a {{DestinationTopic}}. Both 
would have the simplified {{*SerializationSchema}} as argument. To make things 
simple internally, the first variant could wrap the topic in a implementation 
of {{DestinationTopic}} that always returns the same topic.


was (Author: erikvanoosten):
In my ideal world method {{getTargetTopic}} would be removed from 
{{SerializationSchema}} and moved to a new interface, e.g. {{DestinationTopic}}.
Then there are two constructor variants for {{FlinkKafkaProducer}}: one would 
take a topic ({{String}}), the other would take a {{DestinationTopic}}. Both 
would have the simplified {{SerializationSchema}} as argument. To make things 
simple internally, the first variant could wrap the topic in a implementation 
of {{DestinationTopic}} that always returns the same topic.

> Kafka sink: default topic should not need to exist
> --------------------------------------------------
>
>                 Key: FLINK-6928
>                 URL: https://issues.apache.org/jira/browse/FLINK-6928
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector
>    Affects Versions: 1.3.0, 1.2.1
>            Reporter: Erik van Oosten
>
> When using a Kafka sink, the defaultTopic needs to exist even when it is 
> never used. It would be nice if fetching partition information for the 
> default topic would be delayed until the moment a topic is actually used.
> Cause: {{FlinkKafkaProducerBase.open}} fetches partition information for the 
> default topic.
> In addition, it would be nice if we could signal that the defaultTopic is not 
> needed by passing {{null}}. Currently, a value for the defaultTopic is 
> required.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to