Annotation Type RabbitProperty


  • @Documented
    @Retention(RUNTIME)
    @Target({PARAMETER,TYPE,METHOD})
    @Repeatable(RabbitProperties.class)
    @Bindable
    @Inherited
    public @interface RabbitProperty
    Used 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.String name
      Never used if applied to a parameter.
      java.lang.Class type
      Only to be used when defining consumer arguments to convert the value to the required type by RabbitMQ.
      java.lang.String value
      If 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:
        ""
      • name

        java.lang.String name
        Never used if applied to a parameter. Supplies the property name if used on a class or method.
        Returns:
        The name of property
        Default:
        ""
      • type

        java.lang.Class type
        Only to be used when defining consumer arguments to convert the value to the required type by RabbitMQ.
        Returns:
        The type to convert the value to
        Default:
        java.lang.Void.class