Java DCP Client connection health

Hi!

I know that the java-dcp-client is not officially supported, but we use it for our own implementation of the RabbitMQ connector since an official one is not available. So, I’m hoping for an answer.

My question is: Is there a way to check the connection status of a DCPClient from the code, or is there a reliable method to monitor the connection status?

As far as I understand, all potential ways to determine the status are encapsulated within the client’s code. I understand that the client supports automatic reconnection, and I’m also aware of the client’s metrics, which can be used for alerting. However, that’s not exactly what I need.

The only way I see to check the connection status from the code is to extract the dcp.connection.status metric, but that feels like a rather hacky approach.

1 Like

Hi @andrei.seliverstov,

I’ll be the first to admit it’s not ideal, but I believe you’ve found the best option available today.

Tracking this feature request as JDCP-254 Add programmatic support for monitoring health of DCP client. Please let me know if there are any details you’d like us to add to the Jira issue.

I can’t commit to a timeline, but I agree this is an important feature that would benefit the first-party Couchbase connectors as well as your RabbitMQ connector.

Thanks,
David