Skip to content

Commit f5898da

Browse files
committed
Update README.md
1 parent a21797f commit f5898da

1 file changed

Lines changed: 23 additions & 22 deletions

File tree

  • python/cross_service/topics_and_queues

python/cross_service/topics_and_queues/README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ The sample code builds a command line application that asks you for input. This
1919
### Create an SNS topic
2020

2121
```
22-
Would you like to work with FIFO topics? (y/n)
22+
Would you like to work with FIFO topics? (y/n):
2323
```
2424

2525
You configure FIFO (First-In-First-Out) topics when you create them. Choosing a FIFO topic enables other options, too. To learn more, see [FIFO topics example use case](https://docs.aws.amazon.com/sns/latest/dg/fifo-example-use-case.html).
2626

2727

2828
```
29-
Use content-based deduplication instead of a deduplication ID? (y/n)
29+
Use content-based deduplication instead of entering a deduplication ID? (y/n):
3030
```
3131

3232
Deduplication is only available for FIFO topics. Deduplication prevents the subscriber from responding more than once to events that are determined to be duplicates. If a message gets published to an SNS FIFO topic and it’s found to be a duplicate within the five-minute deduplication interval, the message is accepted but not delivered. For more information, see [Message deduplication for FIFO topics](https://docs.aws.amazon.com/sns/latest/dg/fifo-message-dedup.html).
3333

3434
Content-based deduplication uses a hash of the content as a deduplication ID. If content-based deduplication is not enabled, you must include a deduplication ID with each message.
3535

3636
```
37-
Enter a name for your SNS topic:
37+
Enter a name for your SNS topic:
3838
```
3939

4040
Topic names can have 1-256 characters. They can contain uppercase and lowercase ASCII letters, numbers, underscores, and hyphens. If you chose a FIFO topic, the application automatically adds a “.fifo” suffix, which is required for FIFO topics.
@@ -45,27 +45,27 @@ Now, configure two SQS queues to subscribe to your topic. Separate queues for ea
4545
instance, you can customize how messages are consumed and how messages are filtered.
4646

4747
```
48-
Enter a name for an SQS queue.
48+
Enter a name for SQS queue #1:
4949
```
5050

5151
Queue names can have 1-80 characters. They can contain uppercase and lowercase ASCII letters, numbers, underscores, and hyphens. If you chose a FIFO topic, the application automatically adds a “.fifo” suffix, which is required for FIFO queues.
5252

5353

5454
```
55-
Filter messages for "<queue name>.fifo"s subscription to
56-
the topic "<topic name>.fifo"? (y/n)
55+
Filter messages for <queue name>'s subscription to the topic? (y/n):
5756
```
5857

5958
If you chose FIFO topics, you can add a filter to the queue’s topic subscription. There are many ways to filter a topic. In this example code, you have the option to filter by a predetermined selection of attributes. For more information about filters, see [Message filtering for FIFO topics](https://docs.aws.amazon.com/sns/latest/dg/fifo-message-filtering.html).
6059

6160

6261
```
63-
You can filter messages by one or more of the following "tone" attributes.
64-
1. cheerful
65-
2. funny
66-
3. serious
67-
4. sincere
68-
Enter a number (or enter zero to stop adding more)
62+
You can filter messages by one or more of the following TONE attributes.
63+
Enter a number to add a TONE filter, or enter 0 to stop adding filters.
64+
1. cheerful
65+
2. funny
66+
3. serious
67+
4. sincere
68+
Your choice:
6969
```
7070

7171
If you add a filter, you can select one or more “tone” attributes to filter by. When you’re done, enter “0’” to continue.
@@ -79,47 +79,48 @@ After you create the topic and subscribe both queues, the application lets you p
7979

8080

8181
```
82-
Enter a message text to publish.
82+
Enter a message to publish:
8383
```
8484

8585
All configurations include a message text.
8686

8787

8888
```
89-
Enter a message group ID for this message.
89+
Enter a message group ID for this message:
9090
```
9191

9292
If this is a FIFO topic, then you must include a group ID. The group ID can contain up to 128 alphanumeric characters `(a-z, A-Z, 0-9)` and punctuation `(!"#$%&'()*+,-./:;<=>?@[\]^_``{|}~)`.
9393
For more information about group IDs, see [Message grouping for FIFO topics](https://docs.aws.amazon.com/sns/latest/dg/fifo-message-grouping.html).
9494

9595

9696
```
97-
Enter a deduplication ID for this message.
97+
Enter a deduplication ID for this message:
9898
```
9999

100100
If this is a FIFO topic and content-based deduplication is not enabled, then you must enter a deduplication ID. The message deduplication ID can contain up to 128 alphanumeric characters `(a-z, A-Z, 0-9)` and punctuation `(!"#$%&'()*+,-./:;<=>?@[\]^_``{|}~)`.
101101

102102

103103
```
104-
Add an attribute to this message? (y/n) y
104+
Add an attribute to this message? (y/n):
105105
```
106106

107107
If you added a filter to one of the subscriptions, you can choose to add a filtering attribute to the message.
108108

109109

110110
```
111-
1. cheerful
112-
2. funny
113-
3. serious
114-
4. sincere
115-
Enter a number for an attribute:
111+
Enter a number for an attribute:
112+
1. cheerful
113+
2. funny
114+
3. serious
115+
4. sincere
116+
Your choice:
116117
```
117118

118119
Select a number for an attribute.
119120

120121

121122
```
122-
Post another message? (y/n)
123+
Send another message? (y/n):
123124
```
124125

125126
You can post as many messages as you want.

0 commit comments

Comments
 (0)