Add Symfony Messenger Integration Module to AI module
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3493260. -->
Reported by: [seogow](https://www.drupal.org/user/3065779)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>TODO: - A lot of this may need to be re-written in light of: <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/ai/-/work_items/3560792" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/ai/-/work_items/3560792</a></span><br>
We have PoC that can guide this issue.</p>
<p>Create a new module (ai_messenger) that provides Symfony Messenger integration for background processing of AI operations, with Redis transport support and queue monitoring capabilities. (Note: We may want this to be a runner that doesn't need AI. Could be sm_runner instead?)</p>
<p>Long-running AI operations currently block the user interface and can timeout during execution. We need:</p>
<ul>
<li>Asynchronous processing of AI operations</li>
<li>Reliable message queuing</li>
<li>Progress tracking for background tasks</li>
<li>Queue monitoring and management</li>
<li>Ability to handle process interruptions</li>
</ul>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ol>
<li>New Module Structure
<ul>
<li>Create ai_messenger module - NOTE: may not be ai_</li>
<li>Implement Redis transport configuration</li>
<li>Add queue monitoring capabilities</li>
<li>Provide integration with Process Abstraction Layer</li>
<li>Require the SM module <a href="https://www.drupal.org/project/sm">https://www.drupal.org/project/sm</a></li>
</ul>
</li>
<li>Core Features
<ul>
<li>Message queue management</li>
<li>Background worker processes</li>
<li>Progress tracking integration</li>
<li>Queue status monitoring</li>
<li>Error handling and recovery</li>
</ul>
</li>
<li>Configuration System
<ul>
<li>Redis connection settings</li>
<li>Worker process configuration</li>
<li>Queue settings</li>
<li>Retry policies</li>
</ul>
</li>
<li>Monitoring Features
<ul>
<li>Queue status overview</li>
<li>Failed message handling</li>
<li>Process monitoring</li>
<li>Worker status tracking</li>
</ul>
</li>
</ol>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Explore <a href="https://www.drupal.org/project/redis">https://www.drupal.org/project/redis</a></p>
<h3 id="summary-api-changes">API changes</h3>
<ul>
<li>
<li>New service definitions</li>
<li>New configuration schema</li>
</ul>
> Related issue: [Issue #3493240](https://www.drupal.org/node/3493240)
issue