Skip to content

Commit

Permalink
JavaScript (v3): SNS - Add metadata for publishing with attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpyle0819 authored and meyertst-aws committed Sep 28, 2023
1 parent 6a596f1 commit 2dbf22b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .doc_gen/metadata/sns_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,15 @@ sns_Publish_WithAttribute:
- cpp.example_code.cross-service.topics_and_queues.sns_client
- cpp.example_code.cross-service.topics_and_queues.publish_message_with_attributes
- cpp.example_code.cross-service.topics_and_queues.publish_message_with_attributes2
JavaScript:
versions:
- sdk_version: 3
github: javascriptv3/example_code/cross-services/wkflw-topics-queues
sdkguide:
excerpts:
- description: Publish a message to a topic with group, duplication, and attribute options.
snippet_tags:
- javascript.v3.wkflw.topicsandqueues.publish-messages
services:
sns: {Publish}
sns_ConfirmSubscription:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ export class TopicsQueuesWkflw {
}
}

// snippet-start:[javascript.v3.wkflw.topicsandqueues.publish-messages]
async publishMessages() {
const message = await this.prompter.input({
message: MESSAGES.publishMessagePrompt,
Expand Down Expand Up @@ -327,6 +328,7 @@ export class TopicsQueuesWkflw {
await this.publishMessages();
}
}
// snippet-end:[javascript.v3.wkflw.topicsandqueues.publish-messages]

async receiveAndDeleteMessages() {
for (const queue of this.queues) {
Expand Down

0 comments on commit 2dbf22b

Please sign in to comment.