Knowledge base

Read and rewrite the message verified

Nine functions that read and replace every part of an incoming message — including the whole job as JSON.

In detail

Message id, envelope, recipient and MIME each have a getter and a setter; MQ_json hands over the job object itself, in json-c form, which means a plugin can add, change or remove any property the engine understands or any of our own. This is the same power a rewrite rule has, exercised earlier and in C. The comparison is worth making explicitly, because it decides whether a plugin is ever the right answer: a rewrite rule is configuration, visible in the console, changeable without a restart, and written once for every node. A plugin is a binary on one machine. For a customer's node, the practical consequence is that a message may already have been rewritten before any rule sees it — so a job that does not match its own rules is not necessarily a bug in the rules.