Memory Source

Memory source is provided to consume events produced by the memory sink through topics. The topic is like pubsub topic such as mqtt, so that there could be multiple memory sinks which publish to the same topic and multiple memory sources which subscribe to the same topic. The typical usage for memory action is to form rule pipelines. The data transfer between the memory action and the memory source is in internal format and is not coded or decoded for efficiency. Therefore, the format attribute of the memory source is ignored.

There is no configuration properties. The topic is specified by the stream data source property like below examples:

  1. CREATE TABLE table1 (
  2. name STRING,
  3. size BIGINT,
  4. id BIGINT
  5. ) WITH (DATASOURCE="devices/result", FORMAT="json", TYPE="memory");

Topic Wildcard

Similar to mqtt topic, memory source also supports topic wildcards. Currently, there are two wildcards supported.

+ : Single level wildcard replaces one topic level. #: Multi level wildcard covers multiple topic levels, and it can only be used at the end.

Examples:

  1. home/device1/+/sensor1
  2. home/device1/#