Skip to content

Create message payload from template files #224

@acogoluegnes

Description

@acogoluegnes

From the mailing list.

Payload for published messages could be based on one or several template files that would contain placeholders to make the content dynamic, e.g.:

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
    "payload": {
        "trxid": "DEPOSIT-PUBSUB-${uuid}",
        "trx_amount": ${list('5000','10000','50000')},
        "trx_notes": "${list('Deposit','Expense')}"
    }
}

Other candidate "functions" in placeholder could be sequence, random (not an UUID, just a random, 10-character long string).

Functions could accept arguments, e.g. ${random(length:16, cache:50)}.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions