SendTransactedMsg URL

This URL sends all outstanding messages by using the Send Transacted Sending services.

URL structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path

SendTransactedMsg URL structure

Parameter values

msgId
The ID number that uniquely identifies the message. Indicates the message to send when the command is invoked by using the value in the MSGID column of the MSGSTORE table. Specify either msgId or numOfMessages. If numOfMessages is used with the msgId parameter, the numOfMessages is ignored.
numOfMessages
Optional: Specifies the number of messages in the MSGSTORE table to send. Only the messages that have a RETRIES value larger than 0 are sent. Specify either numOfMessages or msgId.
batchSize
Optional: Specifies the maximum number of messages to send in one transaction; the default value is 1. If one message in the batch cannot be sent, then all other messages in the batch will be requeued for the next URL execution. Use this parameter with the numOfMessages parameter, or on its own.

Example 1

This example shows sending a maximum of 99 messages with a batch size of 3.

https://myhostname/webapp/wcs/stores/servlet/SendTransactedMsg?numOfMessages=99&batchSize=3

Example 2

This example shows sending a message with the ID 123456.

https://myhostname/webapp/wcs/stores/servlet/SendTransactedMsg?msgId=123456

Behavior

  • When the URL runs, the SendTransactedMsgCmd controller command is called to send messages that are queued by using the sendTransacted() sending service.
  • The performExecute() method calls the assembleMsg() method to extract the optional parameters.
  • Outstanding messages are in the MSGSTORE database table and sent. Each message is sent in an individual transaction (when batchSize is 1). If an exception is encountered during the sending of a message, the value in MSGSTORE.RETRIES column for the message is decremented by 1. The service then attempts to send the next message that is located. The message that the service failed to send remains stored and if the value of the RETRIES column is larger than 0, the service attempts to send the message again during the next URL execution. Messages with a value of 0 in the RETRIES column are left in the table and not sent until a Site Administrator increments the value in the RETRIES column. Alternatively, the Administrator can delete the message from the table.

    If batchSize is larger than one, say 3, it attempts to send 3 messages before a transaction is completed. After the transaction is completed, the rest of outstanding messages will be attempted. If there are fewer than 3 messages, transaction will be completed after the last message is attempted.

  • If the retry duration (in hours) of a message type is assigned to email transport, the value of the RETRIES column is not decremented until the retry duration ends. This duration begins with the first attempt of sending the message.

Exception conditions

  • If a parameter is invalid, the parameter is ignored.