Hi,
I created a runtime web-action that ll fetch events from journal api like this
const journalObservable = await client.getEventsObservableFromJournal(baseURL, journalOptions);
journalObservable.subscribe(
x => logger.log('onNext: ' + JSON.stringify(x)), // any action onNext event
e => logger.error('onError: ' + e.message), // any action onError
() => logger.log('onCompleted')) //action onComplete
I am able to invoke the web action from postman. And when I publish events into the journal api, my logs read the events from journal successfully.
Now the web action stays alive like 1-2 mins. Then dies. So if event is published say after 5 mins, those events are not received. Is this expected?
Alternate I could think is, create as non-web-action using alarm. And cron trigger the action every say 5 mins. Is this correct that "Reading journal events must be created as non-web-action using alarm cron?"