@Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented @MessageMapping @Repeatable(value=AzureMessageListeners.class) public @interface AzureMessageListener
destination(). The containerFactory() identifies the
ListenerContainerFactory to use to build
the Azure listener container. If not set, a default container factory is
assumed to be available with a bean name of azureListenerContainerFactory
unless an explicit default has been provided through configuration.
Processing of @AzureMessageListener annotations is performed by registering a
AzureListenerAnnotationBeanPostProcessor. This can be done through the
@EnableAzureMessaging annotation.
Annotated Azure listener methods are allowed to have flexible signatures similar
to what MessageMapping provides:
Message to use Spring's messaging abstraction counterpart@Payload-annotated method
arguments, including support for validation@Header-annotated method
arguments to extract specific header values, including standard Azure headers defined by
@Headers-annotated
method argument that must also be assignable to Map for obtaining
access to all headersMessageHeaders arguments for obtaining
access to all headersMessageHeaderAccessor or
access to all method argumentsThis annotation may be used as a meta-annotation to create custom composed annotations with attribute overrides.
EnableAzureMessaging,
AzureListenerAnnotationBeanPostProcessor| Modifier and Type | Required Element and Description |
|---|---|
String |
destination
The destination name for this listener, resolved through the container-wide
DestinationResolver strategy. |
| Modifier and Type | Optional Element and Description |
|---|---|
String |
concurrency
The concurrency limits for the listener, if any.
|
String |
containerFactory
The bean name of the
ListenerContainerFactory
to use to create the message listener container responsible for serving this endpoint. |
String |
group
The name for the durable group, if any.
|
String |
id
The unique identifier of the container managing this endpoint.
|
public abstract String destination
DestinationResolver strategy.public abstract String id
If none is specified, an auto-generated one is provided.
public abstract String containerFactory
ListenerContainerFactory
to use to create the message listener container responsible for serving this endpoint.
If not specified, the default container factory is used, if any.
public abstract String group
public abstract String concurrency
The concurrency limits can be a "lower-upper" String — for example, "5-10" — or a simple upper limit String — for example, "10", in which case the lower limit will be 1.
Note that the underlying container may or may not support all features. For instance, it may not be able to scale, in which case only the upper limit is used.
Copyright © 2020 Microsoft. All rights reserved.