Can u return two topics on the same worker?

i have this worker code

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
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


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.