Skip to content

Commit

Permalink
deploy: 8f88508
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosschroh committed May 31, 2024
1 parent afa57ba commit 978ce8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions serialization/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,10 @@ <h3 id="initilize-streams-with-a-deserializer-and-produce-events-with-serializer


<span class="nd">@stream_engine</span><span class="o">.</span><span class="n">stream</span><span class="p">(</span><span class="n">topic</span><span class="p">,</span> <span class="n">middlewares</span><span class="o">=</span><span class="p">[</span><span class="n">middleware</span><span class="o">.</span><span class="n">Middleware</span><span class="p">(</span><span class="n">JsonDeserializerMiddleware</span><span class="p">)])</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">hello_stream</span><span class="p">(</span><span class="n">cr</span><span class="p">:</span> <span class="n">ConsumerRecord</span><span class="p">):</span>
<span class="c1"># remember event.value is now a dict</span>
<span class="nb">print</span><span class="p">(</span><span class="n">cr</span><span class="o">.</span><span class="n">value</span><span class="p">[</span><span class="s2">&quot;message&quot;</span><span class="p">])</span>
<span class="n">save_to_db</span><span class="p">(</span><span class="n">cr</span><span class="p">)</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">hello_stream</span><span class="p">(</span><span class="n">cr</span><span class="p">:</span> <span class="n">ConsumerRecord</span><span class="p">):</span>
<span class="c1"># remember event.value is now a dict</span>
<span class="nb">print</span><span class="p">(</span><span class="n">cr</span><span class="o">.</span><span class="n">value</span><span class="p">[</span><span class="s2">&quot;message&quot;</span><span class="p">])</span>
<span class="n">save_to_db</span><span class="p">(</span><span class="n">cr</span><span class="p">)</span>
</code></pre></div>
<div class="highlight"><pre><span></span><code><span class="k">await</span> <span class="n">stream_engine</span><span class="o">.</span><span class="n">send</span><span class="p">(</span>
<span class="n">topic</span><span class="p">,</span>
Expand Down
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 978ce8c

Please sign in to comment.