Missing DCP events for specific partitions

Hi,

I have been trying to use DCP to be able to receive all document mutations.

I’m using java 10 and the java dcp-client 0.20.0

I log immediately after receiving an event and only receive approximately 40% of all expected mutations.

I’ve been logging the partition number while upserting a document and this helped me finding out that there are several partitions for which I never receive any of the expected DCP mutation events, even after hours and also after restarting the streaming from my saved sessionState.

I’ve been trying to isolate the issue by starting the stream only for that partition number, and indeed it missed logging the expected mutations.

Is this a known issue or can it be linked to any common configuration mistake ?

Thank you in advance,
Thibault

Java DCP client is not a supported library. Please have a look at the Couchbase Eventing Service that was introduced in Couchbase Server 5.5 Release.

Talks(Overview+Demo) :

With a Billion Document Demo:

Documentation: https://docs.couchbase.com/server/6.0/eventing/eventing-overview.html

Hi Venkat,

Let me describe here my use-case:
For each document mutation, I’d like to read the updated document and upon certain values, publish a business event of my own via google cloud PubSub.

I’ve read the documentation about the Eventing Service and also read this article that explains some similar use-case:
https://blog.couchbase.com/using-the-curl-function-with-the-couchbase-eventing-service/

By combining the Eventing Service and the cURL function, I could call an endpoint that would send my PubSub business event. However I couldn’t find information whether it’s possible to configure the Eventing Service to keep re-executing functions until it’s successful (in case the service called by cURL occasionally fails) and therefore guarantee that my business event would always be sent.

Would you have any idea how I could do this ?

Hi t.billet,

You could put curl call in a simple ‘for’ loop that retries on failure. This would be easiest option but it’s probably not good idea if you expect the calls to take more than a few seconds to succeed finally.

If you expect calls to be slow or many retries needed before it finally succeeds, you can create a timer when a curl call fails, and retry the failing call a bit later.

Please see:
https://blog.couchbase.com/timers-couchbase-functions/

Best Regards,
Siri