<p>In Kafka,published messages stored in the Persistent log files,so messages will not lost.when the subscription side started,it can still consume the message.</p>
<p>In Kafka,published messages stored in the Persistent log files,so messages will not lost.when the subscription side started,it can still consume the message.</p>
<p>In RabbitMQ, the application will create Persistent Exchange and Queue at the <strong>first start</strong>, CAP will create a new consumer queue for each consumer group,<strong>because the application started but the subscription side hasn's start yet so there has no queue,thus the message can not be persited,and the published messages will lost</strong></p>
<p>In RabbitMQ, the application will create Persistent Exchange and Queue at the <strong>first start</strong>, CAP will create a new consumer queue for each consumer group,<strong>because the application started but the subscription side hasn's start yet so there has no queue,thus the message can not be persited,and the published messages will lost</strong></p>
<p>There are two ways to solve this <codeclass="codehilite">message lost</code> issue in RamitMQ:</p>
<p>There are two ways to solve this <codeclass="codehilite">message lost</code> issue in RamitMQ:</p>
<ul>
<ul>
...
@@ -1075,22 +1063,6 @@ You can also use multiple <code class="codehilite">CapSubscribe[""]</c
...
@@ -1075,22 +1063,6 @@ You can also use multiple <code class="codehilite">CapSubscribe[""]</c
<labelclass="md-nav__title"for="__toc">Table of contents</label>
<ulclass="md-nav__list"data-md-scrollfix>
<liclass="md-nav__item">
<ahref="#any-im-groupeg-tencent-qq-group-to-learn-and-chat-about-cap"title="Any IM group(e.g Tencent QQ group) to learn and chat about CAP?"class="md-nav__link">
Any IM group(e.g Tencent QQ group) to learn and chat about CAP?
</a>
</li>
<liclass="md-nav__item">
<ahref="#does-it-require-certain-different-databases-one-each-for-productor-and-resumer-in-cap"title="Does it require certain different databases, one each for productor and resumer in CAP?"class="md-nav__link">
Does it require certain different databases, one each for productor and resumer in CAP?
</a>
</li>
<liclass="md-nav__item">
<ahref="#how-to-use-the-same-database-for-different-programs"title="How to use the same database for different programs?"class="md-nav__link">
How to use the same database for different programs?
</a>
</li>
<liclass="md-nav__item">
<ahref="#if-dont-care-about-message-missing-can-message-productor-exist-without-any-database-for-the-reason-of-sending-message-only"title="If don't care about message missing, can message productor exist without any database, for the reason of sending message only."class="md-nav__link">
If don't care about message missing, can message productor exist without any database, for the reason of sending message only.
<labelclass="md-nav__title"for="__toc">Table of contents</label>
<ulclass="md-nav__list"data-md-scrollfix>
<liclass="md-nav__item">
<ahref="#any-im-groupeg-tencent-qq-group-to-learn-and-chat-about-cap"title="Any IM group(e.g Tencent QQ group) to learn and chat about CAP?"class="md-nav__link">
Any IM group(e.g Tencent QQ group) to learn and chat about CAP?
</a>
</li>
<liclass="md-nav__item">
<ahref="#does-it-require-certain-different-databases-one-each-for-productor-and-resumer-in-cap"title="Does it require certain different databases, one each for productor and resumer in CAP?"class="md-nav__link">
Does it require certain different databases, one each for productor and resumer in CAP?
</a>
</li>
<liclass="md-nav__item">
<ahref="#how-to-use-the-same-database-for-different-programs"title="How to use the same database for different programs?"class="md-nav__link">
How to use the same database for different programs?
</a>
</li>
<liclass="md-nav__item">
<ahref="#if-dont-care-about-message-missing-can-message-productor-exist-without-any-database-for-the-reason-of-sending-message-only"title="If don't care about message missing, can message productor exist without any database, for the reason of sending message only."class="md-nav__link">
If don't care about message missing, can message productor exist without any database, for the reason of sending message only.
<h2id="any-im-groupeg-tencent-qq-group-to-learn-and-chat-about-cap">Any IM group(e.g Tencent QQ group) to learn and chat about CAP?<aclass="headerlink"href="#any-im-groupeg-tencent-qq-group-to-learn-and-chat-about-cap"title="Permanent link">¶</a></h2>
<divclass="admonition faq">
<pclass="admonition-title">Any IM group(e.g Tencent QQ group) to learn and chat about CAP?</p>
<p>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.</p>
<p>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.</p>
<h2id="does-it-require-certain-different-databases-one-each-for-productor-and-resumer-in-cap">Does it require certain different databases, one each for productor and resumer in CAP?<aclass="headerlink"href="#does-it-require-certain-different-databases-one-each-for-productor-and-resumer-in-cap"title="Permanent link">¶</a></h2>
</div>
<divclass="admonition faq">
<pclass="admonition-title">Does it require certain different databases, one each for productor and resumer in CAP?</p>
<p>Not requird differences necessary, a given advice is that using a special database for each program.</p>
<p>Not requird differences necessary, a given advice is that using a special database for each program.</p>
<p>Otherwise, look at Q&A below.</p>
<p>Otherwise, look at Q&A below.</p>
<h2id="how-to-use-the-same-database-for-different-programs">How to use the same database for different programs?<aclass="headerlink"href="#how-to-use-the-same-database-for-different-programs"title="Permanent link">¶</a></h2>
</div>
<divclass="admonition faq">
<pclass="admonition-title">How to use the same database for different applications?</p>
<p>defining a prefix name of table in <codeclass="codehilite">ConfigureServices</code> method。</p>
<p>defining a prefix name of table in <codeclass="codehilite">ConfigureServices</code> method。</p>
<p>Different prefixed names cause SLB to no effect.</p>
</div>
</div>
<h2id="if-dont-care-about-message-missing-can-message-productor-exist-without-any-database-for-the-reason-of-sending-message-only">If don't care about message missing, can message productor exist without any database, for the reason of sending message only.<aclass="headerlink"href="#if-dont-care-about-message-missing-can-message-productor-exist-without-any-database-for-the-reason-of-sending-message-only"title="Permanent link">¶</a></h2>
<divclass="admonition faq">
<pclass="admonition-title">Can CAP not use the database as event storage? I just want to sent the message</p>
<p>Not yet.</p>
<p>Not yet.</p>
<p>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.</p>
<p>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.</p>
</div>
<divclass="admonition faq">
<pclass="admonition-title">If the consumer is abnormal, can I roll back the database executed sql that the producer has executed?</p>
<p>Can't roll back, CAP is the ultimate consistency solution.</p>
<p>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.</p>