[fusion_builder_container hundred_percent=”no” equal_height_columns=”no” menu_anchor=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” background_color=”” background_image=”” background_position=”center center” background_repeat=”no-repeat” fade=”no” background_parallax=”none” parallax_speed=”0.3″ video_mp4=”” video_webm=”” video_ogv=”” video_url=”” video_aspect_ratio=”16:9″ video_loop=”yes” video_mute=”yes” overlay_color=”” video_preview_image=”” border_size=”” border_color=”” border_style=”solid” padding_top=”” padding_bottom=”” padding_left=”” padding_right=””][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” border_position=”all” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” center_content=”no” last=”true” min_height=”” hover_type=”none” link=”” first=”true”][fusion_text]
I have been working building a Spring Boot application running at AWS. Today I was working on setting it up to receive SQS messages. Like many things in Spring Boot, it is remarkably simple. Just create a method with the @SQSListener annotation like this:
@SqsListener(“queue-name”)
public void queueListener(String message, @Header(“SenderId”) String senderId) {
// Do stuff…
}
In all the documentation I read, the “queue-name” was a short name, like the Name of the Queue. However, when I used my Queue’s name I got the following error:
Ignoring queue with name ‘AGEventQueue’: The queue does not exist.; nested exception is com.amazonaws.services.sqs.model.QueueDoesNotExistException: The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID:XXXXXX
The fix is to use the Queue’s URL instead of the name. None of the documentation I was reading pointed that out, so I’m writing it here!
[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
Leave a Reply