File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/source Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 33
33
import java .util .concurrent .CompletableFuture ;
34
34
import java .util .stream .Collectors ;
35
35
import java .util .stream .IntStream ;
36
+
37
+ import io .awspring .cloud .sqs .operations .BatchingSqsClientAdapter ;
36
38
import org .slf4j .Logger ;
37
39
import org .slf4j .LoggerFactory ;
38
40
import org .springframework .lang .Nullable ;
61
63
* @param <T> the {@link Message} payload type.
62
64
*
63
65
* @author Tomaz Fernandes
66
+ * @author Heechul Kang
64
67
* @since 3.0
65
68
*/
66
69
public abstract class AbstractSqsMessageSource <T > extends AbstractPollingMessageSource <T , Message >
@@ -177,13 +180,15 @@ private ReceiveMessageRequest createRequest(int maxNumberOfMessages) {
177
180
.builder ()
178
181
.queueUrl (this .queueUrl )
179
182
.maxNumberOfMessages (maxNumberOfMessages )
180
- .attributeNamesWithStrings (this .messageSystemAttributeNames )
181
- .messageAttributeNames (this .messageAttributeNames )
182
183
.waitTimeSeconds (this .pollTimeout );
183
184
customizeRequest (builder );
184
185
if (this .messageVisibility >= 0 ) {
185
186
builder .visibilityTimeout (this .messageVisibility );
186
187
}
188
+ if (!(this .sqsAsyncClient instanceof BatchingSqsClientAdapter )) {
189
+ builder .messageAttributeNames (this .messageAttributeNames )
190
+ .attributeNamesWithStrings (this .messageSystemAttributeNames );
191
+ }
187
192
return builder .build ();
188
193
}
189
194
// @formatter:on
You can’t perform that action at this time.
0 commit comments