<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:05:57 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[KAFKA-252] Add regular expressions in topic mapping</title>
                <link>https://jira.mongodb.org/browse/KAFKA-252</link>
                <project id="16285" key="KAFKA">Kafka Connector</project>
                    <description>&lt;p&gt;This is about the pull request I have submitted some days ago here: &lt;a href=&quot;https://github.com/mongodb/mongo-kafka/pull/82&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-kafka/pull/82&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the time, I was not able to access this Jira project to submit a new feature before submitting the PR... Sorry.&lt;/p&gt;

&lt;p&gt;The main idea is to allow regular expressions in &apos;topic.namespace.map&apos; property, so that, for example, every database starting with &quot;myDB-&quot; should be mapped to a certain topic (this is a very simple example of course)&lt;/p&gt;

&lt;p&gt;Hope the PR will be reviewed soon...&lt;/p&gt;

&lt;p&gt;Regards&lt;/p&gt;</description>
                <environment></environment>
        <key id="1882770">KAFKA-252</key>
            <summary>Add regular expressions in topic mapping</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="valentin.kovalenko@mongodb.com">Valentin Kavalenka</assignee>
                                    <reporter username="jeanfrancois.guena@gmail.com">Jean-Francois Guena</reporter>
                        <labels>
                            <label>external-user</label>
                    </labels>
                <created>Fri, 24 Sep 2021 12:51:13 +0000</created>
                <updated>Wed, 9 Aug 2023 10:09:33 +0000</updated>
                            <resolved>Thu, 27 Jul 2023 15:21:02 +0000</resolved>
                                                    <fixVersion>1.11.0</fixVersion>
                                    <component>Configuration</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5592372" author="robert.walters" created="Wed, 26 Jul 2023 13:27:17 +0000"  >&lt;p&gt;SGTM it appears that using / will still obtain the objective as stated by the PR&lt;/p&gt;</comment>
                            <comment id="5572462" author="JIRAUSER1258163" created="Mon, 17 Jul 2023 22:37:47 +0000"  >&lt;p&gt;Keys in the &lt;tt&gt;topic.namespace.map&lt;/tt&gt; (which is really a BSON document represented as extended JSON text that must be parseable by &lt;tt&gt;Document.parse&lt;/tt&gt;) must start with a MongoDB database name to be used, otherwise, their values are ignored by the connector. This follows from the current behavior of &lt;tt&gt;DefaultTopicMapper&lt;/tt&gt;. According to &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/limits/#naming-restrictions&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/reference/limits/#naming-restrictions&lt;/a&gt;, a database name cannot contain &lt;tt&gt;/&lt;/tt&gt; (forward slash) in any of the currently supported operating systems. These two facts allow us to assume that keys in the &lt;tt&gt;topic.namespace.map&lt;/tt&gt; do not currently contain &lt;tt&gt;/&lt;/tt&gt; (if they do, they are not names of a database, and, therefore, are not used). Therefore, instead of introducing a new &lt;tt&gt;TopicMapper&lt;/tt&gt; implementation, as suggested in the original PR linked to the ticket, we may change the behavior of &lt;tt&gt;DefaultTopicMapper&lt;/tt&gt; in a backward-compatible way: if a key starts with &lt;tt&gt;/&lt;/tt&gt; (note that we don&apos;t require it to end with &lt;tt&gt;/&lt;/tt&gt;, as it was suggested in the original PR, because I see no reason to), we consider that key to be a regular expression&lt;sup&gt;1&lt;/sup&gt; with the syntax specified by &lt;a href=&quot;https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html&lt;/a&gt;, otherwise we threat it as we currently do. The benefit of this approach is that users will be able to mix the current and regexp-based configuration without having to switch to a different &lt;tt&gt;TopicMapper&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;As for the rest of the functionality, I think we should adopt what was proposed in the original PR.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert.walters%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;robert.walters@mongodb.com&quot;&gt;robert.walters@mongodb.com&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ross%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;ross@mongodb.com&quot;&gt;ross@mongodb.com&lt;/a&gt; (Ross is actually on vacation, so for now the question is mostly for Robert) does that sound good?&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; If there are configurations in the wild with &lt;tt&gt;topic.namespace.map&lt;/tt&gt; that has a key that starts with &lt;tt&gt;/&lt;/tt&gt;, that key is currently guaranteed to be ignored by the connector, as was described above. However, if we start using &lt;tt&gt;/&lt;/tt&gt; as a regexp marker, that may suddenly change how the connector behaves with those configurations. Given all that I explained above, I think it is acceptable to assume that such keys do not exist in the wild, and warn the users in what&apos;s new about what may happen if such keys exist (see &lt;a href=&quot;https://jira.mongodb.org/browse/DOCSP-31502&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/DOCSP-31502&lt;/a&gt;).&lt;/p&gt;</comment>
                            <comment id="4129074" author="robert.walters" created="Mon, 18 Oct 2021 12:39:17 +0000"  >&lt;p&gt;Thank you for your submission, we will consider this for 1.8.0&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="1967460">KAFKA-280</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001stHAnQAM]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q2</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr3mmh:0400000942rf1i01i</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>