Raw route detail type

The raw route detail type tells the engine to pass the message data through without translating it. As with all route types, the message can be processed by one or more Tcl procedures.

The raw route detail takes a single source message and turns it into resulting messages going to one or more destination protocol threads. The resulting messages can contain user data and metadata as the source, or they can contain different data.

A raw route detail may be made up of a list of Tcl procedures, which are run in sequence. If the procedure does not return a message, then the translation of the source message ends. The source message that is given to the procedure is not moved to the protocol or post-translation queue, and the message dies.

Upon entry to each procedure, the source message’s translation destination metadata field contains the list of the message’s destination connections.

Before the first procedure is called, the source message’s metadata is set to the default list of destinations that is configured for the route detail. Each procedure can modify the list of destination connections, but if no modifications are made, the default list stays in place. Modifications to the list can be made by direct manipulation or by calling a programmatic interface.

Each message returned by a procedure may or may not contain the same data and destination connection information. A procedure can create multiple messages with different data, with each going to one or more different destination connections.

When the engine has called all procedures that are listed in the raw route detail, each message returned is placed into the Protocol Message Queue. After the entire translation is complete, each message is moved to the Post-Translation Queue. Then, the message is sent to the destination connection that is listed in the message’s translation destination data. This is in the msgXlateDests field.

If a raw route detail must generate a message unrelated to the flow of the source message, then it can create a binary object that:

  • Updates the new message’s translation destination data in the msgXlateDests field to point to the destination for the new message.
  • Returns the original, possibly unmodified, source message.
  • Returns the new unrelated message.

Unrelated messages are not given to any remaining procedure associated with the route detail.

For example, a message that is given to the remaining procedures is tagged with a key of CONTINUE. The message sent to a connection independent from other messages is tagged with a key of SEND.

These messages are held in separate keyed lists, a Tcl data structure. A message’s disposition change sets it on a new path, separate from its peers.

Any message that is listed in a keyed list is immediately placed into the Partial Queue without further processing.

After the translation is complete, all messages in the Partial Queue are moved to the correct Post-Translation Queue in a FIFO message priority order. CONTINUE and SEND messages follow the same path as other messages, but the CONTINUE messages go on to further post-processing.

If the translation does not finish for any reason, then messages that are placed in the Partial Queue are not sent to any connection.

If the source message still exists in the Pre-Translation Queue, then messages in the Partial Queue are removed, and the translation restarts.

Common metadata field names are:

  • Message ID: msgSrcMid
  • Message translation destination: msgXlateDests