# Custom names for intermediate FK-Join topics

**URL:** <https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788>\
**Category:** Kafka Streams\
**Created:** [12 May 2025 08:25 UTC](https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788 "2025-05-12T08:25:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grigala](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/grigala/32/5080_2.png) [@grigala](https://forum.confluent.io/u/grigala)\
**Post date:** [12 May 2025 08:25 UTC](https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788/1 "2025-05-12T08:25:53Z")

</div>

From the discussion [Understanding internal topics](https://forum.confluent.io/t/understanding-internal-topics/13459) we’ve learned the purpose of the internal FK-Join topics(Unfortunately I cannot comment on that post as it’s closed, therefore creating a new post).

Is there a way we can give those topics a custom name/identifier to make them relatable to the input topic? Or suffix/prefix it with something that let’s us know to which input topic this automatically generated topic relates to?

As mentioned in the above linked post, the payloads of those topics aren’t really readable, therefore it’s almost impossible to know which input topic given FK join the belongs to.

Right now we have for example quite a few of them and we have no idea which input topic they belong to:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/2X/f/fb21a676918eed4eafb34ab016f3f4bed18ffb07.png)

Thanks in advance

---

<div class="post-metadata">

**Author:** ![mjsax](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mjsax/32/3113_2.png) [@mjsax](https://forum.confluent.io/u/mjsax)\
**Post date:** [12 May 2025 17:49 UTC](https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788/2 "2025-05-12T17:49:59Z")

</div>

You can pass a `TableJoined` object into `KTable.join(...)` to influence names for these internal topics.

---

<div class="post-metadata">

**Author:** ![grigala](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/grigala/32/5080_2.png) [@grigala](https://forum.confluent.io/u/grigala)\
**Post date:** [13 May 2025 08:15 UTC](https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788/3 "2025-05-13T08:15:55Z")

</div>

Hey @mjsax, thanks for the answer. Great to hear about `TableJoined` parameter, discovered [https://github.com/apache/kafka/pull/11368](https://github.com/apache/kafka/pull/11368) in the meantime too.

Can you confirm that the usage of `TableJoined`would produce the following topics? (dug a bit into the code to figure out how it’s implemented).

So if I previously had:

```java
tableA.join(
    tableB, 
    keyExtractor, 
    valueJoiner, 
    Materialized.as("")
);

```

generating the following fk-join topics:

> <https://github.com/confluentinc/kafka/blob/60b095ed413660918937bcaa5e97aca64599fa96/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java#L1232-L1236>

```auto
<application.id>-KTABLE-FK-JOIN-SUBSCRIPTION-REGISTRATION-00000000XX-topic
<application.id>-KTABLE-FK-JOIN-SUBSCRIPTION-RESPONSE-00000000XX-topic
<application.id>-KTABLE-FK-JOIN-SUBSCRIPTION-STATE-STORE-00000000XX-topic

```

Which I’m assuming is belonging to one specific join.

And now if I’d do

```java
tableA.join(
    tableB, 
    keyExtractor, 
    valueJoiner, 
    TableJoined.as("tableA-to-tableB-fk-join"),
    Materialized.as("")
);

```

would I get:

```auto
<application.id>-tableA-to-tableB-fk-join-subscription-registration-topic
<application.id>-tableA-to-tableB-fk-join-subscription-response-topic
<application.id>-tableA-to-tableB-fk-join-subscription-state-store-topic

```

Is that right?

---

<div class="post-metadata">

**Author:** ![grigala](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/grigala/32/5080_2.png) [@grigala](https://forum.confluent.io/u/grigala)\
**Post date:** [13 May 2025 09:47 UTC](https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788/4 "2025-05-13T09:47:06Z")

</div>

Update: I’ve managed to utilize `Topology.describe()` to check the results. Indeed it works!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [20 May 2025 09:47 UTC](https://forum.confluent.io/t/custom-names-for-intermediate-fk-join-topics/37788/5 "2025-05-20T09:47:53Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
