Class SendMessageBatchCommandProtected

Delivers up to ten messages to the specified queue. This is a batch version of SendMessage.

Example

Use a bare-bones client and the command you need to make an API call.

import { QueuesClient, SendMessageBatchCommand } from "@stedi/sdk-client-queues"; // ES Modules import
// const { QueuesClient, SendMessageBatchCommand } = require("@stedi/sdk-client-queues"); // CommonJS import
const client = new QueuesClient(config);
const input = { // SendMessageBatchInput
queueUrl: "STRING_VALUE", // required
messages: [ // SendMessageBatchItemList // required
{ // SendMessageBatchItem
id: "STRING_VALUE",
messageBody: "STRING_VALUE",
delaySeconds: Number("int"),
messageGroupId: "STRING_VALUE",
messageDeduplicationId: "STRING_VALUE",
},
],
};
const command = new SendMessageBatchCommand(input);
const response = await client.send(command);
// { // SendMessageBatchOutput
// successful: [ // SendMessageBatchResultList
// { // SendMessageBatchResult
// id: "STRING_VALUE",
// messageId: "STRING_VALUE",
// md5OfMessageBody: "STRING_VALUE",
// },
// ],
// failed: [ // BatchOperationErrorItemList
// { // MessageBatchErrorItem
// id: "STRING_VALUE",
// senderFault: true || false,
// code: "STRING_VALUE",
// message: "STRING_VALUE",
// },
// ],
// };

Param

SendMessageBatchCommandInput

Returns

SendMessageBatchCommandOutput

See

Throws

AccessDeniedException (client fault)

Throws

ProductUnavailableException (client fault)

Throws

ResourceAlreadyExistsException (client fault)

Throws

ResourceNotFoundException (client fault)

Throws

ResourceUnderChangeException (client fault)

Throws

ServiceException (server fault)

Throws

QueuesServiceException

Base exception class for all service exceptions from Queues service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions