GitHub user estebanz01 edited a discussion: how pulsar functions and parallel runtime works when consuming in key shared mode?
Hola! 👋 Right now I have a small python function but I'm not sure how it will behave in a Key shared subscription type. ### One topic - multi key if the function listens to an specific persistent topic. Assuming the topic receives messages with three different `partition_key`s (`deviceA`, `deviceB`, `deviceC`) and I have for the parallel entry `parallelism: 4`, will the messages be distributed on 3/4 running instances or it will be distributed across all 4/4 running instances? ### Regex topic - multi key If the function listens to a regex pattern instead `public/client/data.*` which yields two different persistent topics, and same assumption about `partition_key`s (`deviceA`, `deviceB`, `deviceC`) with a parallel entry of `parallelism: 4`, how the messages will be distributed across the running instances ? Here's the yaml I'm using with the `TestFunction` python code: ```yaml tenant: "public" namespace: "analytics" name: "TestFunction" # function name className: "testFunction.TestFunction" topicsPattern: "persistent://public/client/data.*" output: "non-persistent://public/analytics/test" # the return value of this function will be sent to this topic autoAck: true # function will acknowledge input messages if set true parallelism: 4 retainKeyOrdering: true ``` thanks in advance! GitHub link: https://github.com/apache/pulsar/discussions/21964 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
