diff --git a/.doc_gen/metadata/sns_metadata.yaml b/.doc_gen/metadata/sns_metadata.yaml index b0dabf2f4bd..dad4295a002 100644 --- a/.doc_gen/metadata/sns_metadata.yaml +++ b/.doc_gen/metadata/sns_metadata.yaml @@ -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: diff --git a/javascriptv3/example_code/cross-services/wkflw-topics-queues/TopicsQueuesWkflw.js b/javascriptv3/example_code/cross-services/wkflw-topics-queues/TopicsQueuesWkflw.js index 0f2310e84b2..308a42a6f53 100644 --- a/javascriptv3/example_code/cross-services/wkflw-topics-queues/TopicsQueuesWkflw.js +++ b/javascriptv3/example_code/cross-services/wkflw-topics-queues/TopicsQueuesWkflw.js @@ -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, @@ -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) {