<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Felipe Mattioli</title>
    <description>The latest articles on DEV Community by Felipe Mattioli (@felipemattioli).</description>
    <link>https://dev.to/felipemattioli</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1583507%2F585db897-df74-4e1d-908e-0a17ebb49ae4.jpg</url>
      <title>DEV Community: Felipe Mattioli</title>
      <link>https://dev.to/felipemattioli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/felipemattioli"/>
    <language>en</language>
    <item>
      <title>Improving Azure Service Bus Development with AsbFlow</title>
      <dc:creator>Felipe Mattioli</dc:creator>
      <pubDate>Thu, 23 Oct 2025 11:47:56 +0000</pubDate>
      <link>https://dev.to/felipemattioli/organizing-and-improving-message-production-and-consumption-in-azure-service-bus-with-asbflow-3pi7</link>
      <guid>https://dev.to/felipemattioli/organizing-and-improving-message-production-and-consumption-in-azure-service-bus-with-asbflow-3pi7</guid>
      <description>&lt;p&gt;Today, I’d like to introduce a clean and effective way to bring &lt;strong&gt;organization and clarity&lt;/strong&gt; to your Azure Service Bus integrations.&lt;/p&gt;

&lt;p&gt;If you’ve ever struggled to keep message producers and consumers organized — or found yourself repeatedly writing boilerplate code to handle message publishing, retries, or custom behaviors — &lt;strong&gt;AsbFlow&lt;/strong&gt; was built to simplify that.&lt;/p&gt;

&lt;p&gt;It provides a &lt;strong&gt;single, fluent, and centralized configuration&lt;/strong&gt; for your Azure Service Bus setup, but it goes beyond that.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;AsbFlow&lt;/strong&gt; also abstracts many of the platform’s possibilities:&lt;br&gt;&lt;br&gt;
middlewares for producers and consumers, multiple message production modes, and other extensibility features — all ready to use out of the box.&lt;/p&gt;

&lt;p&gt;The result is &lt;strong&gt;clarity, organization, and quality&lt;/strong&gt; in your message-driven development — making distributed communication as intuitive as working with &lt;strong&gt;MediatR&lt;/strong&gt;.&lt;/p&gt;


&lt;h3&gt;
  
  
  ⚙️ Message Production Modes
&lt;/h3&gt;

&lt;p&gt;When producing a message with &lt;strong&gt;ICommandProducer&lt;/strong&gt;, &lt;strong&gt;AsbFlow&lt;/strong&gt; provides different ways to publish it, depending on your use case.&lt;br&gt;&lt;br&gt;
Here’s what you can do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📨 &lt;strong&gt;Basic message production&lt;/strong&gt;
Produce a simple command without any additional configuration.
Ideal for straightforward scenarios where no metadata or delay is needed.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ProduceCommandAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;🕒 &lt;strong&gt;Delayed message production&lt;/strong&gt;
Define a delivery delay so the message becomes available for processing after a specific time.
Useful for scheduling or deferring certain operations.,
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ProduceCommandAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TimeSpan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FromMinutes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;🧩 &lt;strong&gt;Production with application properties&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;producer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ProduceCommandAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Dictionary&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;object&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"Source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"CRM"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"Priority"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"High"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🚀 Introducing AzureServiceBusFlow
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AzureServiceBusFlow&lt;/strong&gt; is an open-source library designed to improve the organization of &lt;strong&gt;producers&lt;/strong&gt; and &lt;strong&gt;consumers&lt;/strong&gt; when using Azure Service Bus.&lt;/p&gt;

&lt;p&gt;The core idea is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Have a single, fluent, and centralized place to configure all your producers and consumers — bringing outstanding clarity to your code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can refer to it as &lt;strong&gt;AzureServiceBusFlow&lt;/strong&gt; or just &lt;strong&gt;AsbFlow&lt;/strong&gt;, as you prefer.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Getting Started
&lt;/h2&gt;

&lt;p&gt;Everything starts with a basic configuration, where you set your Azure Service Bus connection string and define your producers and consumers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddAzureServiceBus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cfg&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;cfg&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ConfigureAzureServiceBus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;azureServiceBusConfig&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddProducer&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ExampleCommand1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;EnsureQueueExists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"command-queue-one"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// We support Queue and Topic&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WithCommandProducer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;// or WithEventProducer&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"command-queue-one"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;// Or ToTopic&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddConsumer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FromQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"command-queue-one"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Or FromTopic&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ExampleCommand1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CommandExample1Handler&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;())&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🧠 What’s happening here?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;We’re injecting a &lt;strong&gt;producer&lt;/strong&gt; that sends messages of type &lt;code&gt;ExampleCommand1&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;Whenever you need to publish a message, just inject &lt;code&gt;ICommandProducer&amp;lt;ExampleCommand1&amp;gt;&lt;/code&gt; and call it.
&lt;/li&gt;
&lt;li&gt;A corresponding &lt;strong&gt;consumer&lt;/strong&gt; listens to the same queue and processes messages with the defined handler.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This example is intentionally simple, but it captures the core idea.&lt;/p&gt;

&lt;p&gt;To dive deeper, check the official docs and GitHub repository — they include a full &lt;strong&gt;Samples project&lt;/strong&gt; to explore in more detail:&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/fmattioli/AzureServiceBusFlow" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;br&gt;&lt;br&gt;
📘 &lt;a href="https://fmattioli.github.io/AzureServiceBusFlow/docs/messageConcept.html" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🧩 A Real Example in Production
&lt;/h2&gt;

&lt;p&gt;Here’s a slightly more advanced setup from a real API, which produces multiple message types between different services.  &lt;/p&gt;
&lt;h3&gt;
  
  
  ⚙️ Configuration
&lt;/h3&gt;

&lt;p&gt;As you saw before, it’s mandatory to provide the configurations related to your &lt;strong&gt;Azure Service Bus&lt;/strong&gt; — settings like the messaging mode &lt;strong&gt;(ReceiveAndDelete, PeekLock)&lt;/strong&gt;, &lt;strong&gt;MaxConcurrentCalls&lt;/strong&gt;, &lt;strong&gt;ConnectionString&lt;/strong&gt;, and so on.&lt;/p&gt;

&lt;p&gt;These configurations can be set either by directly instantiating the &lt;strong&gt;AzureServiceBusConfiguration&lt;/strong&gt; class.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/fmattioli/AzureServiceBusFlow/blob/main/src/AzureServiceBusFlow.Sample/Program.cs" rel="noopener noreferrer"&gt;See full sample on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or also by defining them in your &lt;code&gt;appsettings.json&lt;/code&gt; file and mapping them to a configuration class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;appsettings.json&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;example&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"AzureServiceBusConfigurationSettings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ConnectionString"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ServiceBusReceiveMode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ReceiveAndDelete"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;You&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;can&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;PeekLock&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ReceiveAndDelete&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;depending&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;needs&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"MaxAutoLockRenewalDurationInSeconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1800"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Used&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;when&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;PeekLock&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;mode&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"MaxConcurrentCalls"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"10"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🧠 Configuring the use of AsbFlow
&lt;/h3&gt;

&lt;p&gt;After that, I configure everything inside an &lt;strong&gt;extension method&lt;/strong&gt; that extends &lt;strong&gt;IServiceCollection&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
This method is then called in &lt;strong&gt;Program.cs&lt;/strong&gt; to set up the entire &lt;strong&gt;AsbFlow&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
You can explore this in more detail by checking out the example available in the repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AzureServiceBusExtensions&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;IServiceCollection&lt;/span&gt; &lt;span class="nf"&gt;AddAzureServiceBusFlow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="n"&gt;IServiceCollection&lt;/span&gt; &lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;AzureServiceBusConfiguration&lt;/span&gt; &lt;span class="n"&gt;azureServiceBusConfiguration&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// receiving the mapped settings made above&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddAzureServiceBus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cfg&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;cfg&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ConfigureAzureServiceBus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;azureServiceBusConfiguration&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddProducer&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CpfValidationMessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WithCommandProducer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversationQueueName&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddProducer&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;StartSimulationConversationMessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WithCommandProducer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversationQueueName&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddProducer&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;SimulateAvailableFgtsBalanceMessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WithCommandProducer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversationQueueName&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddProducer&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;PixValidationMessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WithCommandProducer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversationQueueName&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddConsumer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;FromQueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conversationQueueName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CpfValidationMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DocumentValidationMessageHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;StartSimulationConversationMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;StartSimulationConversationMessageHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;()&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;PixValidationMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PixValidationMessageHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;())&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once that’s done, all I need to do is create the &lt;strong&gt;producer&lt;/strong&gt; and the &lt;strong&gt;consumer&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Producing a Message
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;sealed&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CpfValidationCommandHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ICommandProducer&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CpfValidationMessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;commandProducer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ICommandHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CpfValidationCommand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;HandleAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CpfValidationCommand&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CancellationToken&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;       
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;commandProducer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ProduceCommandAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToCpfDocumentValidationMessage&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; 
            &lt;span class="n"&gt;cancellationToken&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ProduceCommandAsync expects a CpfDocumentValidationMessage&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Success&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📥 Consuming a Message
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;sealed&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CpfValidationMessageHandler&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IMessageHandler&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CpfValidationMessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt; &lt;span class="nf"&gt;HandleAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;CpfValidationMessage&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="n"&gt;ServiceBusReceivedMessage&lt;/span&gt; &lt;span class="n"&gt;rawMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="n"&gt;CancellationToken&lt;/span&gt; &lt;span class="n"&gt;cancellationToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;        
        &lt;span class="c1"&gt;// Implement your custom logic for the consumed message here&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;As APIs grow, they often produce and consume many message types — and keeping this configuration readable can be a challenge.&lt;br&gt;&lt;br&gt;
That’s where &lt;strong&gt;AsbFlow&lt;/strong&gt; really shines.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔧 What Else Can AsbFlow Do?
&lt;/h2&gt;

&lt;p&gt;Beyond simplifying producers and consumers, &lt;strong&gt;AsbFlow&lt;/strong&gt; provides several powerful features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🧭 &lt;strong&gt;Supports both Queues and Topics&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;⚙️ &lt;strong&gt;Organizes Commands and Events&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Commands&lt;/strong&gt; represent an action &lt;em&gt;(create, update, delete)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Events&lt;/strong&gt; represent a change of state&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;🧩 &lt;strong&gt;Middleware Support (Before producing or consuming messages)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add global headers, execute custom logic, or extend behavior dynamically&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;🕒 &lt;strong&gt;Flexible Message Production&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Schedule delayed messages&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;ApplicationProperties&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Or just send simple messages instantly&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏗️ In Production
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AsbFlow&lt;/strong&gt; is currently running in production and has been performing reliably, greatly helping to streamline message processing and maintain clean, organized code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If this project sounds useful to you, I’d love for you to check it out — or even contribute by adding features or even improve what we have today :)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/fmattioli/AzureServiceBusFlow" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Inspiration
&lt;/h2&gt;

&lt;p&gt;This project was inspired by the idea behind &lt;strong&gt;KafkaFlow&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
During some part of my carreer I worked on &lt;strong&gt;Farfetch&lt;/strong&gt;, there I had the opportunity to work with KafkaFlow and really appreciated its architecture and design principles.&lt;br&gt;&lt;br&gt;
Later in my career, when I started working more closely with &lt;strong&gt;Azure Service Bus&lt;/strong&gt;, I wanted to replicate some of those concepts in a similar way.  &lt;/p&gt;

&lt;p&gt;Of course, &lt;strong&gt;KafkaFlow&lt;/strong&gt; is a much more mature project — it has existed for some years and has an community of contributors — but it was a inspiration to work better with &lt;strong&gt;AzureServiceBusFlow&lt;/strong&gt; or gently &lt;strong&gt;AsbFlow&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>dotnet</category>
      <category>architecture</category>
      <category>azureservicebus</category>
    </item>
    <item>
      <title>Feijuca.Auth – Part 2: Configuring, Creating Realm, and using Feijuca.Auth.API</title>
      <dc:creator>Felipe Mattioli</dc:creator>
      <pubDate>Fri, 11 Jul 2025 11:51:24 +0000</pubDate>
      <link>https://dev.to/felipemattioli/feijucaauth-part-2-configuring-and-creating-your-first-realm-2m2i</link>
      <guid>https://dev.to/felipemattioli/feijucaauth-part-2-configuring-and-creating-your-first-realm-2m2i</guid>
      <description>&lt;p&gt;This is the second article in a series about using Feijuca.Auth.&lt;/p&gt;

&lt;p&gt;If you landed directly on this post, I recommend reading the first part:&lt;/p&gt;

&lt;p&gt;Part 1: &lt;a href="https://dev.to/felipemattioli/feijucaauth-part-1-configuring-the-tool-9ok"&gt;Understanding and Configuring Feijuca.Auth&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
In the first article, we introduced the Feijuca.Auth project—its purpose, concepts, Now we'll move forward to the configuration basics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
Before we dive in, make sure you have the following running:&lt;/p&gt;

&lt;p&gt;✅ Keycloak&lt;br&gt;
You’ll need a Keycloak instance running—either locally or on a server. The official Docker image can be pulled from:&lt;br&gt;
👉 &lt;a href="https://www.keycloak.org/getting-started/getting-started-docker" rel="noopener noreferrer"&gt;https://www.keycloak.org/getting-started/getting-started-docker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ MongoDB&lt;br&gt;
Feijuca.Auth uses MongoDB to store metadata about your Keycloak server—like its URL, client secret, and realm configuration.&lt;/p&gt;

&lt;p&gt;⚠️ Note: Feijuca.Auth does not store any user data. You own the instance entirely—Feijuca.Auth only needs your connection string.&lt;/p&gt;

&lt;p&gt;💡You can use mongodb atlas to create a free mongodb instance.&lt;/p&gt;

&lt;p&gt;💡 You also can contribute and add support to the db from your choice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial Setup&lt;/strong&gt;&lt;br&gt;
Once both Keycloak and MongoDB are running, follow this required configuration step before launching Feijuca.Auth:&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://fmattioli.github.io/Feijuca.Auth/docs/keycloakMandatoryConfigs.html" rel="noopener noreferrer"&gt;Keycloak Mandatory Configuration Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This step teaches you how to configure a client in the master realm (the default Keycloak realm). This client will have permissions required to manage other realms via Feijuca.Auth.&lt;/p&gt;

&lt;p&gt;For further technical details, you can always refer to the full documentation:&lt;/p&gt;

&lt;p&gt;📘 &lt;a href="https://fmattioli.github.io/Feijuca.Auth/docs/gettingStarted.html" rel="noopener noreferrer"&gt;Feijuca.Auth Docs – Getting Started&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Running Feijuca.Auth&lt;/strong&gt;&lt;br&gt;
Once everything is configured, you can run Feijuca.Auth using Docker:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker run \&lt;br&gt;
  -e ConnectionString="mongodb://&amp;lt;username&amp;gt;:&amp;lt;password&amp;gt;@&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;" \&lt;br&gt;
  -e DatabaseName="FeijucaAuth" \&lt;br&gt;
  coderaw/feijuca-auth-api:latest&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;💡 You can change the database name and connection string as needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Feijuca.Auth.API?&lt;/strong&gt;&lt;br&gt;
Feijuca.Auth.API exposes a RESTful API that simplifies Keycloak realm management. With this module, you can:&lt;/p&gt;

&lt;p&gt;Create users, groups, roles&lt;br&gt;
Manage clients and client scopes&lt;br&gt;
Create and configure new realms&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial Realm Setup Endpoint&lt;/strong&gt;&lt;br&gt;
Before doing anything else, you need to call the initial configuration endpoint. This step sets up the realm, client, user, and default settings needed by Feijuca.Auth to operate.&lt;/p&gt;

&lt;p&gt;Here’s the required curl request:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl https://localhost:7018/api/v1/configs/new-realm \&lt;br&gt;
  --request POST \&lt;br&gt;
  --header 'Content-Type: application/json' \&lt;br&gt;
  --data '{&lt;br&gt;
    "realmAdminUser": {&lt;br&gt;
      "email": "", // Set admin user email&lt;br&gt;
      "password": "" // Set admin user password&lt;br&gt;
    },&lt;br&gt;
    "client": {&lt;br&gt;
      "clientId": "feijuca-auth-api" // Must match the client name configured in the master realm&lt;br&gt;
    },&lt;br&gt;
    "clientSecret": {&lt;br&gt;
      "clientSecret": "secret-retrieved-from-client" // Paste the actual client secret here&lt;br&gt;
    },&lt;br&gt;
    "serverSettings": {&lt;br&gt;
      "url": "" // The URL of your running Keycloak instance, e.g., https://localhost:8080&lt;br&gt;
    },&lt;br&gt;
    "realm": {&lt;br&gt;
      "name": "", // Name of the new realm, or an existing one&lt;br&gt;
      "issuer": "serverSettings-url/realmname"&lt;br&gt;
    }&lt;br&gt;
}'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will return a success status code and a message confirming that the initial configuration is complete.&lt;/p&gt;

&lt;p&gt;🔁 After executing this endpoint, you must restart the Feijuca.Auth container. On startup, it will load the configuration from MongoDB and initialize correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Does This Endpoint Do?&lt;/strong&gt;&lt;br&gt;
This endpoint handles the essential setup required for both the Feijuca.Auth.Api and the Feijuca.Auth NuGet package to function properly. One of its core responsibilities is enabling multitenancy support.&lt;/p&gt;

&lt;p&gt;Feijuca automatically maps the tenant user attribute into the token payload, which is crucial for implementing tenant-based access control. Every new user created via Feijuca will have a default tenant assigned, which corresponds to the name of the realm in which the user is being created.&lt;/p&gt;

&lt;p&gt;Behind the scenes, this endpoint performs several operations—such as creating clients, roles, default configurations, and mappings—so you don't have to worry about the heavy lifting. It streamlines the setup process, allowing you to start building with Feijuca.Auth right away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s Next?&lt;/strong&gt;&lt;br&gt;
Once your realm is configured and the container is restarted, you’ll be able to use the REST endpoints provided by Feijuca.Auth to perform all sorts of operations in your realm(s).&lt;/p&gt;

&lt;p&gt;In the next post, I’ll walk through how to protect your own API endpoints using Feijuca.Auth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stay Tuned&lt;/strong&gt;&lt;br&gt;
If you’re building multitenant applications or need a simplified way to manage realms via Keycloak, Feijuca.Auth is designed to help you do just that with minimal setup and full control.&lt;/p&gt;

&lt;p&gt;➡️ Explore the documentation&lt;br&gt;
➡️ Follow me on Dev.to to get updates on the next part!&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>dotnet</category>
      <category>csharp</category>
      <category>jwt</category>
    </item>
    <item>
      <title>Feijuca.Auth - Part 1: Tool Overview</title>
      <dc:creator>Felipe Mattioli</dc:creator>
      <pubDate>Fri, 03 Jan 2025 13:47:32 +0000</pubDate>
      <link>https://dev.to/felipemattioli/feijucaauth-part-1-configuring-the-tool-9ok</link>
      <guid>https://dev.to/felipemattioli/feijucaauth-part-1-configuring-the-tool-9ok</guid>
      <description>&lt;p&gt;This is the first post in a series where I’ll dive deeper into how to use Feijuca.Auth in real-world scenarios — from setup to advanced usage.&lt;/p&gt;

&lt;p&gt;Feijuca.Auth is an open-source project built on top of Keycloak — a well-established authentication and authorization tool widely used and trusted by the developer community.&lt;/p&gt;

&lt;p&gt;The goal of Feijuca.Auth is to make it easier to work with Keycloak in .NET environments, especially in multitenant scenarios. It provides a layer of abstraction with cleaner, more straightforward endpoints, helping to simplify some of the complexity found in Keycloak’s official documentation, which can often be confusing or hard to navigate.&lt;/p&gt;

&lt;p&gt;Beyond handling authentication and authorization, Feijuca.Auth offers APIs that make it easier to interact with Keycloak features such as user creation, client management, role assignments, and more — all via accessible REST endpoints.&lt;br&gt;
These actions can later be consumed within your .NET applications, as Feijuca.Auth also provides a NuGet package that enables several features such as authentication, authorization, and retrieving which tenant(s) a given token belongs to.&lt;/p&gt;

&lt;p&gt;The project was initially created by Felipe Mattioli, a backend developer, and has been in active use for about a year. From the beginning, it has been validated in a real-world application with around 100 daily active users and integration across 9 different APIs, all relying on a secure and centralized identity platform.&lt;/p&gt;

&lt;p&gt;If you're working with .NET and using (or planning to use) Keycloak, Feijuca.Auth can help streamline your setup and save time on repetitive integration work. The project is also open for contributions — so if you enjoy backend development and want to collaborate on something that’s being used in production, feel free to join in.&lt;/p&gt;

&lt;p&gt;Feijuca.Auth also comes with robust and actively maintained documentation, which is constantly evolving. You can check it out here: &lt;a href="https://fmattioli.github.io/Feijuca.Auth/docs/gettingStarted.html" rel="noopener noreferrer"&gt;https://fmattioli.github.io/Feijuca.Auth/docs/gettingStarted.html&lt;/a&gt;.&lt;br&gt;
Feel free to ask questions, explore the project, and evaluate whether it fits your specific needs.&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>dotnet</category>
      <category>api</category>
      <category>jwt</category>
    </item>
  </channel>
</rss>
