flowbro icon indicating copy to clipboard operation
flowbro copied to clipboard

Do flows have to be configured manually?

Open mccstan opened this issue 7 years ago • 3 comments

Do I have to create flows manually as described in the template ?

mccstan avatar Jul 18 '17 09:07 mccstan

Sorry; the example config link was broken. It's fixed now but here's the link: https://github.com/marianogappa/flowbro/blob/master/webroot/configs/config-example.json

Check out the "rules" section in the JSON. Each rule is a condition (described in "pattern") and a set of actions (described in "event"). For example:

{
      "patterns": [
        {
          "field": "{{ .Topic }}",
          "pattern": "notifications"
        },
        {
          "field": "{{ .Value.target }}",
          "pattern": "phone"
        }
      ],
      "events": [
        {
          "eventType": "message",
          "sourceId": "Server",
          "targetId": "Phone",
          "text": "{{.Value.message}}",
          "noJSON": true,
          "aggregate": true
        }
      ]
    },

Means that when a Kafka message comes from the "notifications" topic, and the payload comes with a "target" field that contains the value "phone", then this will trigger an envelope going from "Server" to "Phone".

marianogappa avatar Jul 23 '17 20:07 marianogappa

Yes, sorry, you have to.

marianogappa avatar Jul 23 '17 20:07 marianogappa

Tank you i'll check this ans tell you !

Le 23 juil. 2017 10:42 PM, "Mariano Gappa" [email protected] a écrit :

Yes, sorry, you have to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marianogappa/flowbro/issues/30#issuecomment-317280597, or mute the thread https://github.com/notifications/unsubscribe-auth/APaFhDm5va-maq4ErsB-k5H2DqcNKmIhks5sQ7AagaJpZM4ObEus .

mccstan avatar Jul 23 '17 20:07 mccstan