0

I have a meteor app where user can insert or update into rethink db table and I am watching the change feeds from a node worker and pushing it in rethink-node-job-queue.

Now if somehow my node-worker crashes sometimes , I will loose those changes or I will be unable to track the changes.

Is there a way I can store the changes somewhere or something like that so that I could retrieve those changes after the node server restarts ?

Thanks for any kind of help.

Thomas Rollet
  • 1,573
  • 4
  • 19
  • 33
Nabarag Paul
  • 319
  • 5
  • 19

1 Answers1

0

RethinkDB doesn't have built-in support for persistent or resumeable changefeeds.

In many situations, if you have an updatedAt field in your data, keeping track of the last received change can help reboot the changefeed. For example you might do:

r.table('foo')
 .between(lastEvent.updatedAt, r.maxval, {index: 'updatedAt', leftBound: open})
Etienne Laurin
  • 6,731
  • 2
  • 27
  • 31