Skip to content

Commit 1fc2257

Browse files
trevorrobertsjrTrevor Roberts Jr
andauthored
Updated SQS example to specify it works with FIFO (#162)
Co-authored-by: Trevor Roberts Jr <[email protected]>
1 parent d61aa95 commit 1fc2257

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/examples/sqs/src/bin/sqs-hello-world.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use std::process::exit;
77

8-
/// Sends a message to and receives the message from a queue.
8+
/// Sends a message to and receives the message from a FIFO queue.
99
#[tokio::main]
1010
async fn main() -> Result<(), sqs::Error> {
1111
tracing_subscriber::fmt::init();
@@ -29,6 +29,8 @@ async fn main() -> Result<(), sqs::Error> {
2929
.send_message()
3030
.queue_url(&queue_url)
3131
.message_body("hello from my queue")
32+
// message group id required for FIFO Queue
33+
// comment out ".message_group_id("MyGroup")" for standard queues
3234
.message_group_id("MyGroup")
3335
.send()
3436
.await?;

0 commit comments

Comments
 (0)