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 3333import java .util .concurrent .CompletableFuture ;
3434import java .util .stream .Collectors ;
3535import java .util .stream .IntStream ;
36+
37+ import io .awspring .cloud .sqs .operations .BatchingSqsClientAdapter ;
3638import org .slf4j .Logger ;
3739import org .slf4j .LoggerFactory ;
3840import org .springframework .lang .Nullable ;
6163 * @param <T> the {@link Message} payload type.
6264 *
6365 * @author Tomaz Fernandes
66+ * @author Heechul Kang
6467 * @since 3.0
6568 */
6669public abstract class AbstractSqsMessageSource <T > extends AbstractPollingMessageSource <T , Message >
@@ -177,13 +180,15 @@ private ReceiveMessageRequest createRequest(int maxNumberOfMessages) {
177180 .builder ()
178181 .queueUrl (this .queueUrl )
179182 .maxNumberOfMessages (maxNumberOfMessages )
180- .attributeNamesWithStrings (this .messageSystemAttributeNames )
181- .messageAttributeNames (this .messageAttributeNames )
182183 .waitTimeSeconds (this .pollTimeout );
183184 customizeRequest (builder );
184185 if (this .messageVisibility >= 0 ) {
185186 builder .visibilityTimeout (this .messageVisibility );
186187 }
188+ if (!(this .sqsAsyncClient instanceof BatchingSqsClientAdapter )) {
189+ builder .messageAttributeNames (this .messageAttributeNames )
190+ .attributeNamesWithStrings (this .messageSystemAttributeNames );
191+ }
187192 return builder .build ();
188193 }
189194 // @formatter:on
You can’t perform that action at this time.
0 commit comments