-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE REQUEST - Support CDC integration #2587
Comments
I'm not familiar with Stargate, but IIUC the user was trying to install cdc agent on coordinator nodes but agent is only required on data storing nodes. Please note that what's referenced in the question as Datastax CDC and the CDC Agent are two different products - the latter is meant for C*/DSE self managed options. |
My goal was fully simulate an Astra deployment with CDC enabled by spinning up an ephemeral testcontainers environment each time I run an integration test. I was able to do this by rewriting the "agent" as an OSGi bundle: I also had to modify Stargate to export Cassandra and other dependencies from the persistence bundle due to issues with duplicate MBean registrations: @aymkhalil if there's an easier way LMK, this sideloading approach does feel a bit hacky. |
I see. IIUC Stargate sits in front of a "vanilla" C* cluster. The agent is only required on the C* (C3/C4/DSE) cluster side (data storing nodes only) so I'm not sure why it should be bundled any differently when Stargate is used (but I maybe missing some details).
Installation aside, I'd like to clarify that the "agent" based CDC solution does not provide the same promises as the Astra CDC one. Most importantly, it doesn't guarantee that all mutations on the same primary key will show up on the "data topic" - it does guarantee though that the latest state will be available: E.g. if item with PK X is:
where T1, T2, T3 are in chronological order, there is no guarantee that the Having said that, if your case is Please note that "the read before publishing" operation referenced above is performed by the "connector" that is completely deployed on the Pulsar side of things. The connector also does deduplication, which is required because the agent is deployed on each data node and will be triggered a number of times equal to the replication factor. Apologies if this has diverged from how to enable CDC agent with Stargate environment, but I wanted make sure you are using the right product for the simulation. |
Thanks! At the moment, I only care about
I tried loading the agent using the |
@SpencerC you don't need to configure the Here is an example with testcontainers: https://github.com/datastax/cdc-apache-cassandra/blob/master/testcontainers/src/main/java/com/datastax/testcontainers/cassandra/CassandraContainer.java#L291-L296 To verify, I ran the following experiment locally using the stargate/docker-compose/cassandra-4.0/start_cass_40.sh docker-compose command:
Hope that helps |
@aymkhalil if I just run the stargate/coordinator-4_0 image it behaves like a working Stargate backend; it responds to CQL queries just like one would expect. Are you saying that in order for CDC to work using the agent approach I need to also spin up a Cassandra cluster for Stargate to actually coordinate? I apologize if this is a basic question, I'm no Cassandra expert! |
Ah I get it now - you must be using Stargate with Having said that, I understand the convenience of enabling CDC in developer mode but I'd leave it to the Stargate team to chime in. If the decision is to support it, I'm happy to support any efforts required on the CDC agent side (i.e. your OSGi bundle approach or other approaches as recommended by the Stargate team). |
Thanks! IMHO, the draw of using Astra/Stargate at this point in my company's lifecycle is that we don't need to learn (as an institution) how to support a full Cassandra configuration. Plus this is for an integration test which I'd like my team to be able to run as part of a development workflow, and I feel the Stargate container already takes way too long to startup on its own. |
For reference, this was brought up in Stack Overflow question 76284476.
Add the ability to create a containerized Stargate instance running the CDC Java agent for Astra DB.
The text was updated successfully, but these errors were encountered: