[ https://issues.apache.org/jira/browse/SAMZA-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17251087#comment-17251087 ]
Stuart Perks commented on SAMZA-2612: ------------------------------------- Closing out as withPhysicalName fixes the problem as per [API|https://github.com/apache/samza/blob/master/samza-api/src/main/java/org/apache/samza/system/descriptors/StreamDescriptor.java#L89] > Kafka Topic naming convention is not fully valid with Stream Descriptor > StreamId > -------------------------------------------------------------------------------- > > Key: SAMZA-2612 > URL: https://issues.apache.org/jira/browse/SAMZA-2612 > Project: Samza > Issue Type: Bug > Reporter: Stuart Perks > Priority: Major > > The StreamDescriptor class cannot accept all acceptable formats for Kafka > Topic names. > StreamDescriptor > {code:java} > private static final Pattern STREAM_ID_PATTERN = > Pattern.compile("[\\d\\w-_]+"); > {code} > Kafka Topic Validation > {code:java} > public static final String LEGAL_CHARS = "[a-zA-Z0-9._-]"; > {code} > Taking the example this is valid > {code:java} > KafkaInputDescriptor<PageView> pageViewStreamDescriptor = > kafkaSystemDescriptor.getInputDescriptor("page-view-topic", new > JsonSerdeV2<>(PageView.class)); > {code} > but this is not if we use the name page.view.topic > {code:java} > KafkaInputDescriptor<PageView> pageViewStreamDescriptor = > kafkaSystemDescriptor.getInputDescriptor("page.view.topic", new > JsonSerdeV2<>(PageView.class)); > {code} > [Stream Descriptor > Validation|https://github.com/apache/samza/blob/master/samza-api/src/main/java/org/apache/samza/system/descriptors/StreamDescriptor.java#L48] > [Kafka Topic > Validation|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/internals/Topic.java#L29] -- This message was sent by Atlassian Jira (v8.3.4#803005)