nmondal / cowj

[C]onfiguration [O]nly [Web] on [J]VM
Apache License 2.0
16 stars 11 forks source link

RAMA should have it's own `cron` system to run consumers #94

Closed nmondal closed 8 months ago

nmondal commented 8 months ago

Specifically, this is a good way to setup auto-consumers:

  rama:
    type: jvm-rama
    storage: storage
    uuid: "rama-42-0"
    topics:
      EVENT_1: 
        at: "0 0/1 * * * ?"
        prefix: "yyyy/MM/dd/HH/mm"
        offset: "PT-1M" 
        step: "PT1M"
        consumers:
          - _/processors/evt_1.zm
      EVENT_2: 
        at: "0 */5 * * * *"
        prefix: "yyyy/MM/dd/HH/mm"
        offset: "PT-5M" 
        step: "PT1M"
        consumers:
          - _/processors/evt_1.zm
          - _/processors/evt_2.zm

This looks super clean and start making sense.

hemil-ruparel-blox commented 8 months ago

@nmondal ideally we would like to have consumers on separate machines right?

nmondal commented 8 months ago

That may or may not be true. RAMA system are essentially end points, we can consume any way we want to @hemil-ruparel-blox

nmondal commented 8 months ago

This is sort of done and dusted and put properly with documentation. Also gets used - in 42. https://github.com/nmondal/42/blob/main/events/events.yaml#L37