fetch specific set of records for each poll without setting the flag in camel

前端 未结 2 563
礼貌的吻别
礼貌的吻别 2021-01-27 08:59

I need to pick all the messages from db and send it for reprocessing.

my main requirement is

  1. i should fetch only certain number of records for each poll a
2条回答
  •  囚心锁ツ
    2021-01-27 09:28

    Adding a trigger variable such as processedFlag is definitely the simplest way to go. Initially this variable is set to null.

    Procedure:

    1. Select all records where obj.processedFlag is not null.
    2. Process the record.
    3. After processing, set obj.processedFlag to a value ≠ null.
    4. Begin at 1.

    Not using a trigger variable would only produce a fair amount of headaches, I guess.

提交回复
热议问题