quarkiverse / quarkus-dapr

The Distributed Application Runtime (Dapr) provides APIs that simplify microservice connectivity
https://dapr.io/
Apache License 2.0
31 stars 16 forks source link

Make Topic configurable #85

Closed tillganster closed 1 year ago

tillganster commented 1 year ago

Hello,

Is it possible to use a topic name which can be configured by an environment variable? If use simply use the @Topic Annotation there is a compile time constant needed.

I also tried to use the following syntax but then the topic topicName is used instead of the Topic which is vonfigured in topic.name

    @Inject
    @ConfigProperty(name = "topic.name")
    lateinit var topicName: String

    @POST
    @Path("/handle")
    @Topic(name = "\${topicName}",  pubsubName = "redis-pubsub")
    override fun handleMailEvent(event: CloudEvent<Mail>): String { ... }

Is there any other option to subscribe to a topic ?

naah69 commented 1 year ago

it can be implemented by developing ${topic.name},but it will not change when application is running,just onstart. welcome to pr it.

mcruzdev commented 1 year ago

Hi @naah69 and @tillganster I think that I can to contribute with it.

naah69 commented 1 year ago

ok,welcome to contribute it.

mcruzdev commented 1 year ago

I think that we can close it @naah69