|
1 | 1 | /* |
2 | | - * Copyright 2016-2017 the original author or authors. |
| 2 | + * Copyright 2016-2019 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
113 | 113 | * The topics for this listener. |
114 | 114 | * The entries can be 'topic name', 'property-placeholder keys' or 'expressions'. |
115 | 115 | * An expression must be resolved to the topic name. |
| 116 | + * <p> |
116 | 117 | * Mutually exclusive with {@link #topicPattern()} and {@link #topicPartitions()}. |
117 | 118 | * @return the topic names or expressions (SpEL) to listen to. |
118 | 119 | */ |
119 | 120 | String[] topics() default {}; |
120 | 121 |
|
121 | 122 | /** |
122 | | - * The topic pattern for this listener. |
123 | | - * The entries can be 'topic name', 'property-placeholder keys' or 'expressions'. |
124 | | - * An expression must be resolved to the topic pattern. |
| 123 | + * The topic pattern for this listener. The entries can be 'topic pattern', a |
| 124 | + * 'property-placeholder key' or an 'expression'. The framework will create a |
| 125 | + * container that subscribes to all topics matching the specified pattern to get |
| 126 | + * dynamically assigned partitions. The pattern matching will be performed |
| 127 | + * periodically against topics existing at the time of check. An expression must |
| 128 | + * be resolved to the topic pattern (String or Pattern result types are supported). |
| 129 | + * <p> |
125 | 130 | * Mutually exclusive with {@link #topics()} and {@link #topicPartitions()}. |
126 | 131 | * @return the topic pattern or expression (SpEL). |
| 132 | + * @see org.apache.kafka.clients.CommonClientConfigs#METADATA_MAX_AGE_CONFIG |
127 | 133 | */ |
128 | 134 | String topicPattern() default ""; |
129 | 135 |
|
130 | 136 | /** |
131 | 137 | * The topicPartitions for this listener. |
| 138 | + * <p> |
132 | 139 | * Mutually exclusive with {@link #topicPattern()} and {@link #topics()}. |
133 | 140 | * @return the topic names or expressions (SpEL) to listen to. |
134 | 141 | */ |
|
0 commit comments