You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (JIRA)" <ji...@apache.org> on 2018/03/19 16:29:00 UTC

[jira] [Updated] (KAFKA-6686) Allow reading topic as KStream and GlobalKTable

     [ https://issues.apache.org/jira/browse/KAFKA-6686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias J. Sax updated KAFKA-6686:
-----------------------------------
    Description: 
Users often want to read topic multiple times, eg, as a stream and a table. For KSteam/KTable this is possible by reading the data as a KTable, disable caching on the KTable, and get a stream via {{toStream()}}. This pattern does not work for KStream/GlobalKTable though.

However, there is no need to raise an exception
{quote}Exception in thread “main” org.apache.kafka.streams.errors.TopologyException: Invalid topology: Topic source has already been registered by another source.
{quote}
for this case, because the GlobalKTable is consumer by a different consumer (in contrast to KStream/KTable case for which KStream and KTable use a shared consumer). This fix should also allow to add a topic to a {{Topology}} twice; ie, one as regular and once as global-store topic.

  was:
Users often want to read topic multiple times, eg, as a stream and a table. For KSteam/KTable this is possible by reading the data as a KTable, disable caching on the KTable, and get a stream via {{toStream()}}. This pattern does not work for KStream/GlobalKTable though.

However, there is no need to raise an exception
{quote}Exception in thread “main” org.apache.kafka.streams.errors.TopologyException: Invalid topology: Topic source has already been registered by another source.
{quote}
for this case, because the GlobalKTable is consumer by a different consumer (in contrast to KStream/KTable case for which KStream and KTable use a shared consumer).


> Allow reading topic as KStream and GlobalKTable
> -----------------------------------------------
>
>                 Key: KAFKA-6686
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6686
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Matthias J. Sax
>            Priority: Major
>
> Users often want to read topic multiple times, eg, as a stream and a table. For KSteam/KTable this is possible by reading the data as a KTable, disable caching on the KTable, and get a stream via {{toStream()}}. This pattern does not work for KStream/GlobalKTable though.
> However, there is no need to raise an exception
> {quote}Exception in thread “main” org.apache.kafka.streams.errors.TopologyException: Invalid topology: Topic source has already been registered by another source.
> {quote}
> for this case, because the GlobalKTable is consumer by a different consumer (in contrast to KStream/KTable case for which KStream and KTable use a shared consumer). This fix should also allow to add a topic to a {{Topology}} twice; ie, one as regular and once as global-store topic.



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