Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Components Feeder components can use the queue.push function to push messages into the queue for the componenttheir queue to be sent downstream to linked components.

These messages are received Queued messages will be available to be dequeued and processed by all the components that have connections from that component (see Linking components). This is the Lua code to call it:of the linked downstream components.

Code Block
languagelua
local MessageId = queue.push{data=Data}

This function returns a unique string identifier (the message ID) which can be used to link relate messages together so you can see actions performed on a message in the Logs.

See Custom Logging for more information on this.

You can also use queue.count() to obtain the number of messages in the current components queue. This can be useful for many applications.

One of the ways we use it is with out Build system. If we have several GIT commits queued up then we skip the first few in the queue because builds take a few minutes and it doesn’t make sense to build lots of small commits which are not that important.