Annotation

Introducing LOKI annotation package related classes (for more detailed descriptions, click to view source code comments).

Annotation class package:

👉 loki-annotationopen in new window

@MessageNameopen in new window

  • Description: message name annotation
AttributesTypeRequiredDefaultDescription
topicStringYESnoneTopic name
tagStringNO""Tag
producerStringNO"defaultProducer"Producer
deliveryTimestamplongNO0Delay time
consumerGroupStringNO"defaultConsumerGroup"Consumer group
consumptionThreadCountintNO20Number of threads consumed
maxCacheMessageCountintNO1024Maximum number of cached messages

@MessageKeyopen in new window

  • Description: message key annotation
AttributesTypeRequiredDefaultDescription
valueStringNO""Field name (the value can be none)

@SendMessageopen in new window

  • Description:Send message annotation
AttributesTypeRequiredDefaultDescription
topicStringYESnoneTopic name
asyncbooleanNOfalseAsynchronous send or not
messageStringYES""Send a message, supporting SPEL expression
messageKeyStringNO""Message key, which supports SPEL expression
tagStringNO""Tag
producerStringNO"defaultProducer"Producer
deliveryTimestamplongNO0Delay time

@MessageListeneropen in new window

  • Description: Message receiving annotation
AttributesTypeRequiredDefaultDescription
topicStringNOnoneTopic name Both topicPattern must have a value, topicPattern has higher precedence)
topicPatternStringNOnoneTopic Pattern name (Both topicPattern must have a value, topicPattern has higher precedence)
tagStringNO""TAG
consumerGroupStringNO"defaultConsumerGroup"Consumer group
consumptionThreadCountintNO20Number of threads consumed
maxCacheMessageCountintNO1024Maximum number of cached messages