I've recently started experimenting with AsyncAPI as part of a project at work. My task is to see if we can use AsyncAPI to generate code to send test objects to our existing Kafka queues. I'm not familiar with Kafka.
I'm starting with the API specification at AsyncAPI playground, and trying to generate some Java Spring code from it. However, I've run into an issue in that, in the playground specification, channel names (which will correspond to Kafka topics) are parameterised, e.g. as:
smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured
Is it possible to parameterise the Kafka topic in this way, such that the generated service has the following annotation?
@KafkaListener(topics = "smartylighting.streetlights.1.0.action.{streetlightId}.lighting.measured", groupId = "myGroupId")
Or does this specification (which again, I'm just using to learn AsyncAPI) need to be changed so that topic names are invariant, and instead provide the street light ID as payload data?
Thanks in advance.