Package io.micronaut.rabbitmq.annotation
Annotation Type RabbitProperty
-
@Documented @Retention(RUNTIME) @Target({PARAMETER,TYPE,METHOD}) @Repeatable(RabbitProperties.class) @Bindable @Inherited public @interface RabbitPropertyUsed to set properties while publishing or bind to properties while consuming. For example while producing messages, the annotation can be set at the method or class level to provide static data. It can be applied at the parameter level to set the property differently per execution. While consuming the annotation can be applied to a parameter to bind the property to the argument. In addition, it may also be used to supply any arguments to the broker.- Since:
- 1.1.0
- See Also:
BasicProperties
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringnameNever used if applied to a parameter.java.lang.ClasstypeOnly to be used when defining consumer arguments to convert the value to the required type by RabbitMQ.java.lang.StringvalueIf used as a bound parameter, this is the property name.
-
-
-
Element Detail
-
value
java.lang.String value
If used as a bound parameter, this is the property name. If used on a class level this is value and not the property name.- Returns:
- The name of the property, otherwise it is inferred from the
name()
- Default:
- ""
-
-