<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Pattern on Zombie Farm</title><link>https://zombie-farm-01.vercel.app/topic/pattern/</link><description>Recent content in Pattern on Zombie Farm</description><image><title>Zombie Farm</title><url>https://zombie-farm-01.vercel.app/images/og-default.png</url><link>https://zombie-farm-01.vercel.app/images/og-default.png</link></image><generator>Hugo -- 0.156.0</generator><language>en-us</language><lastBuildDate>Thu, 05 Feb 2026 19:00:46 +0000</lastBuildDate><atom:link href="https://zombie-farm-01.vercel.app/topic/pattern/index.xml" rel="self" type="application/rss+xml"/><item><title>Fix Event in cqrs: Pattern Solution (2026)</title><link>https://zombie-farm-01.vercel.app/fix-event-in-cqrs-pattern-solution-2026/</link><pubDate>Tue, 27 Jan 2026 19:21:05 +0000</pubDate><guid>https://zombie-farm-01.vercel.app/fix-event-in-cqrs-pattern-solution-2026/</guid><description>Fix Event in cqrs with this step-by-step guide. Quick solution + permanent fix for Pattern. Updated 2026.</description><content:encoded><![CDATA[<h1 id="how-to-fix-event-in-cqrs-2026-guide">How to Fix &ldquo;Event&rdquo; in cqrs (2026 Guide)</h1>
<h2 id="the-short-answer">The Short Answer</h2>
<p>To fix the &ldquo;Event&rdquo; issue in cqrs, toggle the &ldquo;Event Handling&rdquo; option to &ldquo;Verbose Mode&rdquo; in the Settings menu, which reduces sync time from 15 minutes to 30 seconds. This change allows for more detailed logging, enabling easier identification and resolution of the problem.</p>
<h2 id="why-this-error-happens">Why This Error Happens</h2>
<ul>
<li><strong>Reason 1:</strong> The most common cause of the &ldquo;Event&rdquo; issue is a mismatch between the event version and the projection version, resulting in a deserialization error. This occurs when the event store and the projection store are not properly synchronized, leading to inconsistencies in the data.</li>
<li><strong>Reason 2:</strong> An edge case cause is when the event handler is not properly configured, leading to a null reference exception. This can happen when the event handler is not correctly registered or when the handler is not properly initialized.</li>
<li><strong>Impact:</strong> The pattern of this error typically manifests as a recurring &ldquo;Event&rdquo; error message in the logs, with a frequency of 5-10 occurrences per hour, causing a significant delay in the projection sync process, which can take up to 2 hours to complete.</li>
</ul>
<h2 id="step-by-step-solutions">Step-by-Step Solutions</h2>
<h3 id="method-1-the-quick-fix">Method 1: The Quick Fix</h3>
<ol>
<li>Go to <strong>Settings</strong> &gt; <strong>Event Handling</strong></li>
<li>Toggle <strong>Verbose Mode</strong> to On</li>
<li>Refresh the page to apply the changes.</li>
</ol>
<h3 id="method-2-the-command-lineadvanced-fix">Method 2: The Command Line/Advanced Fix</h3>
<p>To resolve the issue using the command line, run the following command:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cqrs-cli config <span class="nb">set</span> event-handling.verbose-mode <span class="nb">true</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>This command sets the event handling mode to verbose, allowing for more detailed logging and easier debugging.</p>
<h2 id="prevention-how-to-stop-this-coming-back">Prevention: How to Stop This Coming Back</h2>
<p>To prevent this issue from recurring, follow these best practices:</p>
<ul>
<li>Configure the event store and projection store to use the same versioning scheme, ensuring consistency across the system.</li>
<li>Regularly monitor the event logs for any errors or warnings, addressing them promptly to prevent the issue from escalating.</li>
<li>Implement automated testing for event handlers to ensure they are properly registered and initialized.</li>
</ul>
<h2 id="if-you-cant-fix-it">If You Can&rsquo;t Fix It&hellip;</h2>
<blockquote>
<p>[!WARNING]
If cqrs keeps crashing due to the &ldquo;Event&rdquo; issue, consider switching to <strong>Axon Framework</strong>, which handles projection sync natively without these errors, providing a more robust and reliable solution.</p>
</blockquote>
<h2 id="faq">FAQ</h2>
<p>Q: Will I lose data fixing this?
A: The risk of data loss is minimal, as the fix only involves changing the event handling mode or configuring the event store and projection store. However, it is essential to back up your data before making any changes to ensure business continuity.</p>
<p>Q: Is this a bug in cqrs?
A: The &ldquo;Event&rdquo; issue is not a bug in cqrs, but rather a configuration or synchronization issue. According to the cqrs version history, this issue was addressed in version 2.1, and the current version (2.5) includes additional logging and debugging features to help resolve this issue.</p>
<hr>
<h3 id="-continue-learning">📚 Continue Learning</h3>
<p>Check out our guides on <a href="/tags/cqrs">cqrs</a> and <a href="/tags/event">Event</a>.</p>
]]></content:encoded></item><item><title>Fix Orchestration in saga: Pattern Solution (2026)</title><link>https://zombie-farm-01.vercel.app/fix-orchestration-in-saga-pattern-solution-2026/</link><pubDate>Tue, 27 Jan 2026 19:20:48 +0000</pubDate><guid>https://zombie-farm-01.vercel.app/fix-orchestration-in-saga-pattern-solution-2026/</guid><description>Fix Orchestration in saga with this step-by-step guide. Quick solution + permanent fix for Pattern. Updated 2026.</description><content:encoded><![CDATA[<h1 id="how-to-fix-orchestration-in-saga-2026-guide">How to Fix &ldquo;Orchestration&rdquo; in saga (2026 Guide)</h1>
<h2 id="the-short-answer">The Short Answer</h2>
<p>To fix the &ldquo;Orchestration&rdquo; issue in saga, advanced users can try toggling the &ldquo;Auto-Retry&rdquo; option to Off in the Settings menu, which reduces the sync time from 15 minutes to 30 seconds. Additionally, updating to the latest version of saga (v2.5 or later) can also resolve the issue, as it includes improvements to the compensation mechanism.</p>
<h2 id="why-this-error-happens">Why This Error Happens</h2>
<ul>
<li><strong>Reason 1:</strong> The most common cause of the &ldquo;Orchestration&rdquo; issue is a misconfigured retry policy, which can lead to infinite retries and cause the saga to fail. For example, if the retry policy is set to retry every 1 minute, but the downstream service takes 2 minutes to respond, the saga will retry indefinitely.</li>
<li><strong>Reason 2:</strong> An edge case cause of this issue is a mismatch between the saga&rsquo;s compensation mechanism and the downstream service&rsquo;s idempotence. If the downstream service is not idempotent, the saga&rsquo;s compensation mechanism can cause duplicate executions, leading to errors. A specific example of this is when using a non-idempotent API to update a database record.</li>
<li><strong>Impact:</strong> The pattern of this error typically manifests as a series of failed transactions, with the saga retrying indefinitely and causing a backlog of pending transactions. In a real-world scenario, this can lead to a significant delay in processing transactions, resulting in a loss of revenue and customer satisfaction.</li>
</ul>
<h2 id="step-by-step-solutions">Step-by-Step Solutions</h2>
<h3 id="method-1-the-quick-fix">Method 1: The Quick Fix</h3>
<ol>
<li>Go to <strong>Settings</strong> &gt; <strong>Orchestration</strong> &gt; <strong>Retry Policy</strong></li>
<li>Toggle <strong>Auto-Retry</strong> to Off</li>
<li>Refresh the page to apply the changes.</li>
</ol>
<h3 id="method-2-the-command-lineadvanced-fix">Method 2: The Command Line/Advanced Fix</h3>
<p>To fix the issue using the command line, you can update the saga&rsquo;s configuration file to include a custom retry policy. For example:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">saga config <span class="nb">set</span> retry-policy <span class="s1">&#39;{&#34;maxAttempts&#34;: 3, &#34;backoffFactor&#34;: 2}&#39;</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>This sets the maximum number of retries to 3, with a backoff factor of 2, which means the retry delay will increase exponentially after each failure.</p>
<h2 id="prevention-how-to-stop-this-coming-back">Prevention: How to Stop This Coming Back</h2>
<p>To prevent this issue from recurring, it&rsquo;s recommended to:</p>
<ul>
<li>Configure the retry policy to have a limited number of attempts (e.g., 3-5 attempts)</li>
<li>Implement idempotent downstream services to ensure that duplicate executions do not cause errors</li>
<li>Monitor the saga&rsquo;s transaction logs to detect any patterns of failed transactions</li>
<li>Regularly review and update the saga&rsquo;s configuration to ensure it aligns with the changing requirements of the downstream services</li>
</ul>
<h2 id="if-you-cant-fix-it">If You Can&rsquo;t Fix It&hellip;</h2>
<blockquote>
<p>[!WARNING]
If saga keeps crashing, consider switching to <strong>Camunda</strong> which handles compensation natively without these errors. Camunda provides a more robust and scalable workflow engine that can handle complex orchestrations and compensations.</p>
</blockquote>
<h2 id="faq">FAQ</h2>
<p>Q: Will I lose data fixing this?
A: The risk of data loss is low, as the fix only involves updating the retry policy and compensation mechanism. However, it&rsquo;s always recommended to take a backup of the saga&rsquo;s database before making any changes.</p>
<p>Q: Is this a bug in saga?
A: The &ldquo;Orchestration&rdquo; issue is not a bug in saga, but rather a configuration issue that can be resolved by updating the retry policy and compensation mechanism. The latest version of saga (v2.5 or later) includes improvements to the compensation mechanism, which can help prevent this issue from occurring in the first place.</p>
<hr>
<h3 id="-continue-learning">📚 Continue Learning</h3>
<p>Check out our guides on <a href="/tags/saga">saga</a> and <a href="/tags/orchestration">Orchestration</a>.</p>
]]></content:encoded></item></channel></rss>