Rachel Evans created CAMEL-9516:
-----------------------------------
Summary: DynamodbStreamConsumer should provide for a callback once
the stream is being read
Key: CAMEL-9516
URL: https://issues.apache.org/jira/browse/CAMEL-9516
Project: Camel
Issue Type: New Feature
Components: camel-aws
Reporter: Rachel Evans
Priority: Blocker
Fix For: 2.17.0
Use case: I want to read and keep up-to-date with the contents of a table.
Approach: start reading the stream (using DdbStreamConsumer), then _once the
consumer has definitely started reading the stream_, i.e. is guaranteed not to
miss any future updates, _then_ I scan the table.
In order to achieve this I need to know when the consumer has started reading
the stream. Specifically, when the first successful call to GetRecords has
occurred.
Possible approach: on the endpoint URI, define a ddbStreamStartupListener bean
parameter.
Given I have a DdbStreamEndpoint with a ddbStreamStartupListener
When the first call to GetRecords success
Then the bean should be called synchronously (*before* the consumer proceeds
with processing any records that GetRecords returned).
Of course it is up to the user providing that bean what it does – for example,
whether it does something blocking and therefore potentially long, or whether
it triggers something async.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)