PRODUCE

Procudes a message using the specified Producer and a JSON configuration. Use json to creat a configuration object or reference an existing configuration from the outbox using the OUTBOX function or from the Inbox using INBOX.

Syntax

=PRODUCE(Producer, JSONConfiguration)

Arguments

Name Description
Producer Producer to use for producing.
JSONConfiguration A JSON that is either an existing message from the outbox or inbox, or created with JSON or DICTIONARY. A “message” field is required, all other fields depend on the used Prdocuer.

Return Value

TRUE, if successful.

Examples

Function Result Comment

=PRODUCE(“MQTT Producer”, A1)

Content of A1:

{ "message": "A Message", "topic": "cedalo/test"}
TRUE This publishes the string value “A Message” using the “MQTT Producer” under the topic “cedalo/test”.

=PRODUCE(“File Producer”, JSON(A2:B3))

PRODUCE
TRUE This appends “Message” to the file “file.txt” using the “File Producer”