https://kotlinlang.org logo
Title
x

xenoterracide

05/01/2019, 9:02 PM
is it possible to have the spots where I have FOLEY_NEW populated via the results of value on the new annotation?
@Target(AnnotationTarget.FUNCTION)
@Retention
@RabbitListener(
    bindings = [QueueBinding(
        key = [Amqp.FOLEY_NEW],
        value = Queue(Amqp.FOLEY_NEW),
        exchange = Exchange(name = "amq.topic", type = ExchangeTypes.TOPIC  )
    )]
)
annotation class Listener( val value: String )
k

karelpeeters

05/01/2019, 9:19 PM
No, here you're annotating your annotation class, it's not like everything you annotate with
Listener
is also annotated with
RabbitListener
. There's only one
RabbitListener
instance, so its parameters can't take on different values.