Can u return two topics on the same worker?

i have this worker code

@Value("${worker.external.topic}")
String topic;

but i want to reuse the same worker action code and subscribe to a additional Topics. but the issue here is if if auto wire the topic value like something like below
@Value("${worker.external.topic.v2}")
String topic;

how do i ensure the second topic is only subscribed and how do i write a logic very specific to second topic in the same worker action class

vish

On the API level this isn’t a problem. If you take a look here in the docs you can see that a single fetch and lock call can have an array of topics.