Skip to content

KafkaOutput binding 'topic' attribute doesn't support environment variables #158

@meken

Description

@meken

At least for the Java bindings the following config fails:

@KafkaOutput(topic="%KAFKA_TOPIC%", ...

whereas the username, password etc support environment variables. Interestingly, the @KafkaTrigger topic attribute also supports environment variables.

See below the error messsage indicating that the topic name is not resolved properly.

[2020-08-10 13:58:00] Failed to delivery message to %KAFKA_TOPIC% / -1 / -1001. Reason: Local: Unknown topic. Full Error: Local: Unknown topic
[2020-08-10 13:58:00] Executed 'Functions.producer' (Failed, Id=efdce3d9-ba7c-4cdf-aeae-a18aadde68c9)
[2020-08-10 13:58:00] System.Private.CoreLib: Exception while executing function: Functions.producer. Confluent.Kafka: Local: Unknown topic.

Obviously replacing the environment variable with the name of the topic in verbatim works, but I'd expect all config variables to accept environment variables, or at least the same ones as the trigger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions