[
https://issues.apache.org/jira/browse/CAMEL-27828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27828:
--------------------------------
Description:
Found while improving the option descriptions of camel-couchdb for CAMEL-23832
(commit
https://github.com/apache/camel/commit/ed21c0d35408d9c8fd340e12eb3bac97d585474f,
pull request https://github.com/apache/camel/pull/31141).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. style and heartbeat are never sent
{{CouchDbClientWrapper.pollChanges(style, since, heartBeat, max)}} never passes
style or heartBeat to the PostChangesOptions.Builder, so style=all_docs has no
effect (CouchDB uses main_only). No feed type is sent either, so the normal
feed is used, where a heartbeat means nothing.
Proposed change: call builder.style(style); for heartbeat use feed=longpoll
with heartbeat and a timeout, or deprecate it.
h4. 2. The consumer cannot resume
{{CouchDbConsumer}} sets since once, in its constructor, from the update_seq of
the database, and has no setter or adapter hook; the ResumeStrategy run in
doStart cannot move it. So a resume strategy cannot choose the start point,
changes made while the application is down are lost, and changes between
consumer creation and start are skipped.
Proposed change: a CouchDb ResumeAdapter (or setSince on the consumer) that the
strategy can drive, and a documented way to start from 0 or a given sequence.
h4. 3. initDatabase logs created for an existing database
{{CouchDbClientWrapper.initDatabase}} logs "Database {} created" also when the
database already existed.
Proposed change: log only when it was created.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-couchdb for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31141).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. style and heartbeat are never sent
{{CouchDbClientWrapper.pollChanges(style, since, heartBeat, max)}} never passes
style or heartBeat to the PostChangesOptions.Builder, so style=all_docs has no
effect (CouchDB uses main_only). No feed type is sent either, so the normal
feed is used, where a heartbeat means nothing.
Proposed change: call builder.style(style); for heartbeat use feed=longpoll
with heartbeat and a timeout, or deprecate it.
h4. 2. The consumer cannot resume
{{CouchDbConsumer}} sets since once, in its constructor, from the update_seq of
the database, and has no setter or adapter hook; the ResumeStrategy run in
doStart cannot move it. So a resume strategy cannot choose the start point,
changes made while the application is down are lost, and changes between
consumer creation and start are skipped.
Proposed change: a CouchDb ResumeAdapter (or setSince on the consumer) that the
strategy can drive, and a documented way to start from 0 or a given sequence.
h4. 3. initDatabase logs created for an existing database
{{CouchDbClientWrapper.initDatabase}} logs "Database {} created" also when the
database already existed.
Proposed change: log only when it was created.
_Claude Code on behalf of davsclaus_
> camel-couchdb: style and heartbeat are never sent, the consumer cannot resume
> -----------------------------------------------------------------------------
>
> Key: CAMEL-27828
> URL: https://issues.apache.org/jira/browse/CAMEL-27828
> Project: Camel
> Issue Type: Bug
> Components: camel-couchdb
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-couchdb for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/ed21c0d35408d9c8fd340e12eb3bac97d585474f,
> pull request https://github.com/apache/camel/pull/31141).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. style and heartbeat are never sent
> {{CouchDbClientWrapper.pollChanges(style, since, heartBeat, max)}} never
> passes style or heartBeat to the PostChangesOptions.Builder, so
> style=all_docs has no effect (CouchDB uses main_only). No feed type is sent
> either, so the normal feed is used, where a heartbeat means nothing.
> Proposed change: call builder.style(style); for heartbeat use feed=longpoll
> with heartbeat and a timeout, or deprecate it.
> h4. 2. The consumer cannot resume
> {{CouchDbConsumer}} sets since once, in its constructor, from the update_seq
> of the database, and has no setter or adapter hook; the ResumeStrategy run in
> doStart cannot move it. So a resume strategy cannot choose the start point,
> changes made while the application is down are lost, and changes between
> consumer creation and start are skipped.
> Proposed change: a CouchDb ResumeAdapter (or setSince on the consumer) that
> the strategy can drive, and a documented way to start from 0 or a given
> sequence.
> h4. 3. initDatabase logs created for an existing database
> {{CouchDbClientWrapper.initDatabase}} logs "Database {} created" also when
> the database already existed.
> Proposed change: log only when it was created.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)