Skip to content

FAQ

Any IM group(e.g Tencent QQ group) to learn and chat about CAP?

None for that. Better than wasting much time in IM group, I hope developers could be capable of independent thinking more, and solve problems yourselves with referenced documents, even create issues or send emails when errors are remaining present.

Does it require certain different databases, one each for productor and resumer in CAP?

Not requird differences necessary, a given advice is that using a special database for each program.

Otherwise, look at Q&A below.

How to use the same database for different applications?

defining a prefix name of table in ConfigureServices method。

codes exsample:

public void ConfigureServices(IServiceCollection services)
{
    services.AddCap(x =>
    {
        x.UseKafka("");
        x.UseMySql(opt =>
        {
            opt.ConnectionString = "connection string";
            opt.TableNamePrefix = "appone"; // different table name prefix here
        });
    });
}

Can CAP not use the database as event storage? I just want to sent the message

Not yet.

The purpose of CAP is that ensure consistency principle right in microservice or SOA architechtrues. The solution is based on ACID features of database, there is no sense about a single client wapper of message queue without database.

If the consumer is abnormal, can I roll back the database executed sql that the producer has executed?

Can't roll back, CAP is the ultimate consistency solution.

You can imagine your scenario is to call a third party payment. If you are doing a third-party payment operation, after calling Alipay's interface successfully, and your own code is wrong, will Alipay roll back? If you don't roll back, what should you do? The same is true here.