Re: Flink Kafka producer with a topic per message

2016-12-07 Thread Sanne de Roever
Hi Gordon, Yes, this has been addressed in 1.0.0; and in a very nice way. Thank you. Cheers, Sanne On Wed, Dec 7, 2016 at 11:11 AM, Sanne de Roever wrote: > Hi Gordon, > > Sounds very close, I will have look; thx. > > Cheers, > > Sanne > > On Wed, Dec 7, 2016 at 11:09 AM, Tzu-Li (Gordon) Ta

Re: Flink Kafka producer with a topic per message

2016-12-07 Thread Sanne de Roever
Hi Gordon, Sounds very close, I will have look; thx. Cheers, Sanne On Wed, Dec 7, 2016 at 11:09 AM, Tzu-Li (Gordon) Tai wrote: > Hi, > > The FlinkKafkaProducers currently support per record topic through the > user-provided serialization schema which has a "getTargetTopic(T > element)" method

Re: Flink Kafka producer with a topic per message

2016-12-07 Thread Tzu-Li (Gordon) Tai
Hi, The FlinkKafkaProducers currently support per record topic through the user-provided serialization schema which has a "getTargetTopic(T element)" method called for per record, and also decides the partition the record will be sent to through a custom KafkaPartitioner, which is also provided 

Re: Flink Kafka producer with a topic per message

2016-12-07 Thread Sanne de Roever
Having a had a glass of water, the following option came up. Having more advanced Sink integrations is likely to be a more general concern. It would be better to have a more smooth path from the cleaner abstraction to the advanced case. A more general proposal would be to alter the Sink interface

Re: Flink Kafka producer with a topic per message

2016-12-07 Thread Sanne de Roever
A first sketch Central to this functionality is Kafka's ProducerRecord. ProducerRecord was introduced for Kafka 0.8. This means that any functionality could be introduced for all Flink-Kafka connectors; as per https://ci.apache.org/projects/flink/flink-docs-release-1.0/apis/streaming/connectors/ka

Re: Flink Kafka producer with a topic per message

2016-12-07 Thread Sanne de Roever
Good questions, I will follow up piece-wise to address the different questions. Could a Wiki section be an idea, before I spread the information across several posts? On Tue, Dec 6, 2016 at 4:50 PM, Stephan Ewen wrote: > You are right, it does not exist, and it would be a nice addition. > > Can

Re: Flink Kafka producer with a topic per message

2016-12-06 Thread Stephan Ewen
You are right, it does not exist, and it would be a nice addition. Can you sketch some details on how to do that? - Will it be a new type of producer? If yes, can as much as possible of the code be shared between the current and the new producer? - Will it only be part of the Flink Kafka 0.10

Flink Kafka producer with a topic per message

2016-12-06 Thread Sanne de Roever
Hi, Kafka producer clients for 0.10 allow the following syntax: producer.send(new ProducerRecord("my-topic", Integer.toString(i), Integer.toString(i))); The gist is that one producer can send messages to different topics; it is useful for event routing ao. It makes the creation generic endpoints