robinhood / faust

Python Stream Processing
Other
6.72k stars 535 forks source link

[Feature request] Rename application topics #717

Open cbcoutinho opened 3 years ago

cbcoutinho commented 3 years ago

Checklist

Steps to reproduce

import faust

app = faust.App(
    "hello-world",
    broker="kafka://localhost:9092",
    value_serializer="raw",
)

greetings_topic = app.topic("greetings")

@app.agent(greetings_topic)
async def greet(greetings):
    async for greeting in greetings:
        print(greeting)

Running this worker creates a hello-world-__assignor-__leader topic, yet I find no information on how I can change this system topic name.

I am in an organization that has a strict naming convention and topic creation policy regarding the cluster, and I need to be able to create these topics beforehand with different names.

Expected behavior

Be able to specify those topic names

Actual behavior

Currently unable to do so

Full traceback

Paste the full traceback (if there is any)

Versions

cbcoutinho commented 3 years ago

I learned that it's possible to disable the creation of topics and that I can subclass LeaderAssignor to modify the default topic name. It looks like I'm able to proceed using this approach, but I think adding this as an extra option/feature is a good idea.

bobh66 commented 3 years ago

This project appears to have been abandoned.

You might want to check out the fork of this project - https://github.com/faust-streaming/faust

It has a bunch of fixes merged for problems that were in the base project.