Trigger Messages

A Rendezvous or JMS trigger message can contain the USERID, inputDirectory, fileName, filePrefix, and fileExtension properties. When you use a message that has those properties to trigger Publication Service, the JMS trigger message properties override corresponding properties that you set at design time. The changes made at run time do not change the configuration in the repository.

Note: If you select By File Name in the Recognition Method list, the fileName property only contains the file name, and does not contain ICU regular expressions.

When an ICU regular expression is used in trigger messages, if the ICU regular expression contains a comma, the comma is skipped.

For example, a trigger message fileName=go{1,5}gle\.txt contains a comma. The comma is not a property separator, so an "escaping" comma in front of the comma is added: fileName=go{1,,5}gle\.txt.

You can send multiple trigger messages at one time, and each message has properties. After Publication Service receives trigger messages, the messages queue. Publication Service processes them one by one.

Note: When you send multiple trigger messages, ensure that the number of the messages does not exceed reasonable amount that your system resource supports.

TIBCO ActiveMatrix Adapter for Files for Unix/Win makes the best attempt to keep the trigger messages but does not guarantee the success.

Syntax

Follow these rules when using Rendezvous or JMS trigger messages:

  • Only the String property is supported.
  • The properties must be enclosed in double quotation marks.
  • The properties are separated by commas. No spaces are inserted between properties.

    For example, "inputDirectory=reader/input,fileName=foo.txt".

  • The property value can be String and Integer. It cannot contain commas. Other date types are not supported.

Scenarios

Rendezvous and JMS trigger messages are used in the following scenarios:

  • If the trigger message is empty, Publication Service uses the properties defined at design time.
  • The input directory of Publication Service can be changed at run time by sending the following trigger message.
    • Rendezvous message:
      {
      RVMSG_STRING 6 inputDirectory "/home"
      }
    • JMS message:

      "inputDirectory=reader/input"

      The input directory is changed. The change remains in effect until another trigger message with the above format is received.

  • If you select By file name in the Recognition Method list for Publication Service, it can be changed at run time by sending the following message:
    • Rendezvous message:
      {
      RVMSG_STRING 8 fileName "abc.txt"
      }
      {
      RVMSG_STRING 8 DATA "abc.txt"
      }
      In this example, 8 is the length of the abc.txt filename plus one.
    • JMS message:

      "fileName=abc.txt"

      Note: If a JMS trigger message contains no file name property, Publication Service uses the file name specified in the last JMS trigger message, or the file name configured in TIBCO Business Studio if no file name is specified in previous trigger messages. "The trigger message does not mention the input filename therefore use the input filename currently in-effect File_name." is logged.
  • If you select By prefix + extension in the Recognition Method list for Publication Service, it can be changed at run time by sending the following message:
    • Rendezvous message:
      {
      RVMSG_STRING 4 filePrefix "abc"
      RVMSG_STRING 4 fileExtension "txt"
      }
      Additionally the following special fields are also recognized
      {
      RVMSG_STRING 1 USERID ""
      }
      {
      RVMSG_STRING 1 TRACKINGID ""
      }
    • JMS message:

      "filePrefix=abc, fileExtension=txt"

  • When Publication Service gets an invalid trigger message, for example, “fileName=foo.txt,=John” or “reader/input,fileName=foo.txt”, Publication Service discards the message.
  • Publication Service can receive more than one trigger message at one time but processes them one by one. Trigger messages waiting to be processed are saved. If Publication Service stops and then restarts, it continues to process the saved trigger messages.