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

Shengkai Fang commented on FLINK-18602:
---------------------------------------

Currently {{FlinkKafkaConsumerBase#setStartFromSpecificOffsets}} supports 
mapping topic+partition to offset by {{KafkaTopicPartition}} that has two 
fields {{topic}} and {{partition}}.

I think it's better to keep consistent with the previous behaviour. For single 
topic, we can use {{'partition:1,offset:30;partition:0,offset:10'}} and 
{{'topic:topic-1,partition:1,offset:30;topic:topoic-1,partition:0,offset:10'}}. 
For multiple topics(including topic regex), we should only use format like 
{{'topic:topic-1,partition:1,offset:30;topic:topoic-2,partition:0,offset:10'}} 
to specify.

The behaviour of specific-offset in Table api is as same as the behaviour in 
datastream. For more info, you can take a look at [start 
position|https://ci.apache.org/projects/flink/flink-docs-master/dev/connectors/kafka.html#kafka-consumers-start-position-configuration].

> Support specific offset for topic list for kafka connector in table api
> -----------------------------------------------------------------------
>
>                 Key: FLINK-18602
>                 URL: https://issues.apache.org/jira/browse/FLINK-18602
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / Kafka, Table SQL / API
>    Affects Versions: 1.11.0
>            Reporter: Shengkai Fang
>            Assignee: Shengkai Fang
>            Priority: Major
>             Fix For: 1.12.0
>
>
> During FLINK-18449, we decide to support topic discovery for kafka connector 
> in table api. However, we can only use format 
> {{'partition:0,offset:42;partition:1,offset:300'}} to specify the offset for 
> single topic. I think the better format is 
> {{'topic:topic-1,partition:0,offset:42;topic:topic-2,partition:1,offset:300'}}
>  in topic discovery situation.
>   
>   
>   
>   
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to