注释类型 RocketMQMessageListener
-
@Target(TYPE) @Retention(RUNTIME) @Documented public @interface RocketMQMessageListener
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringACCESS_CHANNEL_PLACEHOLDERstatic StringACCESS_KEY_PLACEHOLDERstatic StringNAME_SERVER_PLACEHOLDERstatic StringSECRET_KEY_PLACEHOLDERstatic StringTRACE_TOPIC_PLACEHOLDER
-
必需元素概要
所需元素 修饰符和类型 必需的元素 说明 StringconsumerGroupConsumers of the same role is required to have exactly same subscriptions and consumerGroup to correctly achieve load balance.StringtopicTopic name.
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 StringaccessChannelThe property of "access-channel".StringaccessKeyThe property of "access-key".intawaitTerminationMillisWhenShutdownMaximum time to await message consuming when shutdown consumer, in milliseconds.ConsumeModeconsumeModeControl consume mode, you can choice receive message concurrently or orderly.intconsumeThreadMaxMax consumer thread number.intconsumeThreadNumberconsumer thread number.longconsumeTimeoutMaximum amount of time in minutes a message may block the consuming thread.StringcustomizedTraceTopicThe name value of message trace topic.If you don't config,you can use the default trace topic name.intdelayLevelWhenNextConsumeMessage consume retry strategy in concurrently modebooleanenableMsgTraceSwitch flag instance for message trace.StringinstanceNameThe property of "instanceName".intmaxReconsumeTimesMax re-consume times.MessageModelmessageModelControl message mode, if you want all subscribers receive message all message, broadcasting is a good choice.StringnameServerThe property of "name-server".StringnamespaceThe namespace of consumer.StringnamespaceV2The namespace V2 version of listener, it can not be used in combination with namespace.intreplyTimeoutTimeout for sending reply messages.StringsecretKeyThe property of "secret-key".StringselectorExpressionControl which message can be select.SelectorTypeselectorTypeControl how to selector message.intsuspendCurrentQueueTimeMillisThe interval of suspending the pull in orderly mode, in milliseconds.StringtlsEnableThe property of "tlsEnable" default false.
-
-
-
字段详细资料
-
NAME_SERVER_PLACEHOLDER
static final String NAME_SERVER_PLACEHOLDER
-
-
-
ACCESS_KEY_PLACEHOLDER
static final String ACCESS_KEY_PLACEHOLDER
-
-
-
SECRET_KEY_PLACEHOLDER
static final String SECRET_KEY_PLACEHOLDER
-
-
-
TRACE_TOPIC_PLACEHOLDER
static final String TRACE_TOPIC_PLACEHOLDER
-
-
-
ACCESS_CHANNEL_PLACEHOLDER
static final String ACCESS_CHANNEL_PLACEHOLDER
-
-
-
topic
String topic
Topic name.
-
-
-
selectorType
SelectorType selectorType
Control how to selector message.- 另请参阅:
SelectorType
- 默认值:
- org.apache.rocketmq.spring.annotation.SelectorType.TAG
-
-
-
selectorExpression
String selectorExpression
Control which message can be select. Grammar please seeSelectorType.TAGandSelectorType.SQL92- 默认值:
- "*"
-
-
-
consumeMode
ConsumeMode consumeMode
Control consume mode, you can choice receive message concurrently or orderly.- 默认值:
- org.apache.rocketmq.spring.annotation.ConsumeMode.CONCURRENTLY
-
-
-
messageModel
MessageModel messageModel
Control message mode, if you want all subscribers receive message all message, broadcasting is a good choice.- 默认值:
- org.apache.rocketmq.spring.annotation.MessageModel.CLUSTERING
-
-
-
consumeThreadMax
int consumeThreadMax
Max consumer thread number. This property control consumer thread pool executor maximumPoolSize seeConsumeMessageService.updateCorePoolSize(int)- 另请参阅:
- issues#546
- 默认值:
- 64
-
-
-
accessKey
String accessKey
The property of "access-key".- 默认值:
- "${rocketmq.consumer.access-key:}"
-
-
-
secretKey
String secretKey
The property of "secret-key".- 默认值:
- "${rocketmq.consumer.secret-key:}"
-
-
-
customizedTraceTopic
String customizedTraceTopic
The name value of message trace topic.If you don't config,you can use the default trace topic name.- 默认值:
- "${rocketmq.consumer.customized-trace-topic:}"
-
-
-
nameServer
String nameServer
The property of "name-server".- 默认值:
- "${rocketmq.name-server:}"
-
-
-
accessChannel
String accessChannel
The property of "access-channel".- 默认值:
- "${rocketmq.access-channel:}"
-
-
-
tlsEnable
String tlsEnable
The property of "tlsEnable" default false.- 默认值:
- "false"
-
-
-
namespace
String namespace
The namespace of consumer.- 默认值:
- ""
-
-
-
namespaceV2
String namespaceV2
The namespace V2 version of listener, it can not be used in combination with namespace.- 默认值:
- ""
-
-
-
instanceName
String instanceName
The property of "instanceName".- 默认值:
- "DEFAULT"
-
-