<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vijay Kulthe on Medium]]></title>
        <description><![CDATA[Stories by Vijay Kulthe on Medium]]></description>
        <link>https://medium.com/@mulesoft.nerd?source=rss-1c58b419a465------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*c7X5YDBz9mZpjjr0uiHtaw.png</url>
            <title>Stories by Vijay Kulthe on Medium</title>
            <link>https://medium.com/@mulesoft.nerd?source=rss-1c58b419a465------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:30:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mulesoft.nerd/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Divide Files/Zip files based on there sizes]]></title>
            <link>https://medium.com/@mulesoft.nerd/divide-files-zip-files-based-on-there-sizes-21591d825879?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/21591d825879</guid>
            <category><![CDATA[file-sharing]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[anypoint-platform]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Thu, 13 Jul 2023 17:56:20 GMT</pubDate>
            <atom:updated>2023-07-13T17:56:20.133Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I acquainted with a scenario where i had to divide 100 zip files with different sizes in folder and create a new zip files(in my case <strong>50 mb</strong> or less). In this article we are gonna learn how to do this in mule with less size(20 mb).</p><p><strong>Note </strong>: You can modify the logic based on your file based requirements.</p><p>Step 1: Create zip files at D:\calculate file size location :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*LzL0vdoGN3PY646RQmNRfQ.png" /></figure><p>Step 2: Create project ‘<strong><em>calculate-file-size’</em></strong></p><p>Step 3: Inside flow use add following components as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f5DnAcBOUl4zVEEcJh-uLA.png" /></figure><p>Step 3: After List(which used to fetch all the zip files) operation drag and drop a Tranform message and create variable (logic to find after which index we need to divide the files based on size ) and add below dataweave logic :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*uAM_6JztYPCU3BkKztTw1A.png" /></figure><p>Step 4: After getting the index to divide in next transform message we can write code as below :</p><pre>%dw 2.0<br>output application/java<br>import * from dw::core::Arrays<br>---<br>payload divideBy vars.divideIndexBy</pre><p>Step 5: Iterate over the division of zip files and archive over it and create new zip file as show below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-AUcHc05-dkDLYC-xH_dvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zNHkvBuhwjEiknNtmTLSZw.png" /></figure><p>Result :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*38YYPxToW84gtD2wGn1deg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*87jpLAZpyLrJoS76-cCgww.png" /><figcaption>Created zip files 20mb or less</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7bSxeystVMQbJt1FaOYbw.png" /><figcaption>zip containing zip files</figcaption></figure><blockquote>Connect me with more such content on my youtube channel:</blockquote><p><a href="https://www.youtube.com/@mulenerd">MuleNerd</a></p><p><em>any suggestions ,comments, alternate solution or code issues are welcome, please let me know so that I can improve the learning and code</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21591d825879" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create File InMemory At Runtime(Mulesoft 4)]]></title>
            <link>https://medium.com/@mulesoft.nerd/create-file-inmemory-at-runtime-mulesoft-4-fe1f96a1a2be?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe1f96a1a2be</guid>
            <category><![CDATA[mulesoft-esb]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mulesoft-training]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Wed, 31 May 2023 08:28:36 GMT</pubDate>
            <atom:updated>2023-05-31T08:28:36.764Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes you maybe in need of parking your file temporary In-memory at Runtime.In this article we gonna learn how to do it step by step.</p><h3><strong>Step 1:</strong></h3><p>Create a mule app with name as ‘create-file-inmemory-runtime’</p><h3><strong>Step 2:</strong></h3><blockquote>a) Create xml like below</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*ZyZIMmOikKkcY5luv0QZBA.png" /></figure><blockquote>b) Add a transform msg with below dataweave</blockquote><pre>%dw 2.0<br>output application/json<br>---<br>{<br> &quot;First_name&quot; : &quot;Vijay&quot; ,<br> &quot;Last_Name&quot;  : &quot;Kulthe&quot;<br>}</pre><blockquote>c) Add a write component with path like : ${app.home}/config/test.json</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4ybQZ4XB0w_LuzcXr-Weg.png" /></figure><h3><strong>Step 3:</strong></h3><p>Run the application!!</p><blockquote>You can see the test.json file got create at runtime instance in config folder.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7rOCvjiYC9fSBRhu5DTEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QUVYE1H1ZIp4F9gbjhD_3A.png" /></figure><p><strong><em>Pros:</em></strong></p><p>Park your file in-memory temporary.</p><p><strong><em>Cons:</em></strong></p><p>May cause heap memory issues. So use this approach at own risk.</p><blockquote>To Understand <strong>more about this watch below </strong>video</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXt9YFt-sefM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXt9YFt-sefM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXt9YFt-sefM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ffd155613facc6e880cffb51d04f41f/href">https://medium.com/media/4ffd155613facc6e880cffb51d04f41f/href</a></iframe><p><em>any suggestions ,comments, alternate solution or code issues are welcome, please let me know so that I can improve the learning and code</em></p><p><em>Connect me with more such content on my youtube channel:</em></p><p><a href="https://www.youtube.com/@mulenerd">MuleNerd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe1f96a1a2be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Dataweave) Split String after every 3 character or the index you choose(Mulesoft 4)]]></title>
            <link>https://medium.com/@mulesoft.nerd/dataweave-split-string-after-every-3rd-character-or-the-index-you-choose-mulesoft-4-99ad02a787ea?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/99ad02a787ea</guid>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[dataweave-interview]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Mon, 08 May 2023 03:47:16 GMT</pubDate>
            <atom:updated>2023-10-31T06:52:31.652Z</atom:updated>
            <content:encoded><![CDATA[<p>From this article we are gonna learn how to Split String after every 3rd character or the index you choose in Dataweave script.</p><h3>Input :</h3><pre>{<br>    &quot;message&quot;: &quot;Mulenerd Channnel is for mulesoft learning&quot;<br>}</pre><h3>Expected Output :</h3><pre>[<br>  &quot;Mul&quot;,<br>  &quot;ene&quot;,<br>  &quot;rd &quot;,<br>  &quot;Cha&quot;,<br>  &quot;nnn&quot;,<br>  &quot;el &quot;,<br>  &quot;is &quot;,<br>  &quot;for&quot;,<br>  &quot; mu&quot;,<br>  &quot;les&quot;,<br>  &quot;oft&quot;,<br>  &quot; le&quot;,<br>  &quot;arn&quot;,<br>  &quot;ing&quot;<br>]</pre><h3>Solution I (using splitBy,joinBy,divideBy) :</h3><p>Refer Below script</p><pre>%dw 2.0<br>output application/json<br>/*<br>1) import Arrays module.<br>2) use splitBy , joinBy , divideBy functions<br>4) script logic will return the expected output.<br>*/<br>import * from dw::core::Arrays<br>---<br>((payload.message splitBy  &quot;&quot;) divideBy 3 ) map ((item, index) -&gt; item joinBy  &quot;&quot; )</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-lslIKVx3a_BKHoLq-Huw.png" /><figcaption>Screenshot</figcaption></figure><h3>Solution II (using substringEvery() from Strings module) :</h3><pre>%dw 2.0<br>output application/json<br>/*<br>1) import Strings module.<br>2) use substringEvery()<br>4) script logic will return the expected output.<br>*/<br>import * from dw::core::Strings<br>---<br>payload.message substringEvery  3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70opu-1tPrQIDnMbSvmkeg.png" /></figure><blockquote>To Understand <strong>more about this watch below </strong>video</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJ0PrwFiC7E8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJ0PrwFiC7E8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJ0PrwFiC7E8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b9119440b7c02ccf1e74ece846f07a9/href">https://medium.com/media/1b9119440b7c02ccf1e74ece846f07a9/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9XH8EsbcspeXhO8D0z3DQ.png" /><figcaption>Banner</figcaption></figure><p><em>any suggestions ,comments, alternate solution or code issues are welcome, please let me know so that I can improve the learning and code</em></p><p><em>Connect me with more such content on my youtube channel:</em></p><p><a href="https://www.youtube.com/@mulenerd">MuleNerd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99ad02a787ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Dataweave) Remove Number from String Array & vice versa [“a100”,”b200”….](Mulesoft 4)]]></title>
            <link>https://medium.com/@mulesoft.nerd/dataweave-remove-number-from-string-array-vice-versa-a100-b200-mulesoft-4-56c989296c83?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/56c989296c83</guid>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Wed, 03 May 2023 10:47:17 GMT</pubDate>
            <atom:updated>2023-05-04T06:31:42.709Z</atom:updated>
            <content:encoded><![CDATA[<p>From this article we are gonna learn how to remove number from String array &amp; vice versa in Dataweave script.</p><h3>Input :</h3><p>[“a1007” , “b2007” , “c3007” , “d4007”]</p><h3>Expected Output I (Remove All Numbers from String Array):</h3><p>[“a” , “b”, ”c” , ”d”]</p><h3>Solution I (Remove All Numbers) :</h3><p>Refer Below script</p><pre>%dw 2.0<br>output application/json<br>/*<br>1) import String module.<br>2) use isNumeric() to determine if the character is number or not<br>4) script logic will return the expected output.<br>*/<br>import * from dw::core::Strings<br>var givenInput = [ &quot;a1007&quot; , &quot;b2007&quot;, &quot;c3007&quot;,&quot;d4007&quot;]<br>var expectedOutput1= [&quot;a&quot; , &quot;b&quot;,&quot;c&quot; ,&quot;d&quot;]<br>---<br>givenInput map ((item, index) -&gt;  (item ) filter !isNumeric($) ) </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-84OWMJJLfffydvadJtzw.png" /><figcaption>output</figcaption></figure><h3>Output II (Remove All Characters):</h3><p>[“1007” , “2007” , “3007” , “4007”]</p><h3>Solution II (Remove All Characters) :</h3><p>Refer Below script</p><pre>%dw 2.0<br>output application/json<br>/*<br>1) import String module.<br>2) use isNumeric() to determine if the character is number or not<br>4) script logic will return the expected output.<br>*/<br>import * from dw::core::Strings<br>var givenInput = [ &quot;a1007&quot; , &quot;b2007&quot;, &quot;c3007&quot;,&quot;d4007&quot;]<br>var expectedOutput1= [&quot;a&quot; , &quot;b&quot;,&quot;c&quot; ,&quot;d&quot;]<br>---<br>givenInput map ((item, index) -&gt;  (item ) filter isNumeric($) )</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q26pPHEVkLuHChEknkgj-g.png" /><figcaption>output</figcaption></figure><blockquote>To Understand <strong>more about this watch below </strong>video</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FiIUrqf2gmpc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiIUrqf2gmpc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiIUrqf2gmpc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/422b22be5120dad8217a4fd16a96f9e1/href">https://medium.com/media/422b22be5120dad8217a4fd16a96f9e1/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VVtkdtRDfoK-o3ue-jqEqA.png" /><figcaption>Banner</figcaption></figure><p><em>any suggestions ,comments, alternate solution or code issues are welcome, please let me know so that I can improve the learning and code</em></p><p><em>Connect me with more such content on my youtube channel:</em></p><p><a href="https://www.youtube.com/@mulenerd">MuleNerd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56c989296c83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Update() VS Update operator(Dataweave)]]></title>
            <link>https://medium.com/@mulesoft.nerd/update-vs-update-operator-dataweave-a1ee9c1f692f?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1ee9c1f692f</guid>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Fri, 28 Apr 2023 12:17:13 GMT</pubDate>
            <atom:updated>2023-04-28T12:17:13.781Z</atom:updated>
            <content:encoded><![CDATA[<h3>update() VS update operator(Dataweave)</h3><p>From this article we gonna understand :</p><ol><li>update().</li><li>update operator.</li></ol><h3>update():</h3><p>update() which is defined under Values module(dw::util::Values) helps us to update the a specific field in an object,objects, array of objects.</p><blockquote>Refer below code:</blockquote><pre>%dw 2.0<br>output application/json<br>/*<br>1. import Values module<br>2. use &#39;with&#39; to update a new field<br>*/<br>import * from dw::util::Values<br>---<br>payload.employee update &quot;name&quot; with &quot;Vijay Kulthe&quot;<br></pre><h4>Output:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GgDU_XEcYn52msnOyBW9Q.png" /><figcaption>output with update name</figcaption></figure><blockquote><strong>watch this video for more info on update function</strong></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fml1yASByZuY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dml1yASByZuY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fml1yASByZuY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/78da84feb69b9d8ba34e30df4346253b/href">https://medium.com/media/78da84feb69b9d8ba34e30df4346253b/href</a></iframe><h3>update operator:</h3><p>update operator helps us to update the a specific field in an object,objects, array of objects etc.</p><h4><strong>Input:</strong></h4><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;  <br>&lt;students&gt;  <br>&lt;student&gt;  <br>  &lt;name&gt;Saarthi&lt;/name&gt;  <br>  &lt;result&gt;Passed&lt;/result&gt;  <br>  &lt;age&gt;22&lt;/age&gt;  <br>  &lt;marks&gt;75.4&lt;/marks&gt; <br>  &lt;distiction&gt;Yes&lt;/distiction&gt;  <br>&lt;/student&gt;  <br>&lt;student&gt;  <br>  &lt;name&gt;Sid&lt;/name&gt;  <br>  &lt;result&gt;Passed&lt;/result&gt;  <br>  &lt;age&gt;23&lt;/age&gt;  <br>  &lt;marks&gt;74&lt;/marks&gt;<br>  &lt;distiction&gt;Yes&lt;/distiction&gt;    <br>&lt;/student&gt;<br>&lt;/students&gt;  </pre><blockquote>Refer below code:</blockquote><pre>%dw 2.0<br>output application/json<br>/*<br>1. case one will update all the students object name with &quot;Vijay&quot;<br>2. case two will update marks of students which are decimal to integer using ceil()<br>*/<br>---<br>payload  update {<br>   case .students.*student.name -&gt; &quot;vijay&quot;<br>   case marks at .students.*student.marks if(isDecimal(marks as Number)) -&gt; ceil(marks)<br>}<br><br><br></pre><h4>output :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OainG1aQdmZZUUkjks7zjw.png" /></figure><blockquote><strong>watch this video for more info on update operator</strong></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FCeUEZhhsLx0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCeUEZhhsLx0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FCeUEZhhsLx0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/19f461ebbfac292c9f371fe044cb636e/href">https://medium.com/media/19f461ebbfac292c9f371fe044cb636e/href</a></iframe><p><em>any suggestions ,comments are welcome, please let me know so that I can improve the learning</em></p><p><em>Connect me with more such content on my youtube channel:</em></p><p><a href="https://www.youtube.com/@mulenerd">MuleNerd</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ch3esSEVbOWIhev3h6rlrQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1ee9c1f692f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Circuit Breaker Pattern(Anypoint MQ)(Mulesoft)]]></title>
            <link>https://medium.com/@mulesoft.nerd/circuit-breaker-pattern-anypoint-mq-mulesoft-6bc0999d3f31?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bc0999d3f31</guid>
            <category><![CDATA[mule4]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[anypointmq]]></category>
            <category><![CDATA[anypoint-platform]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Wed, 19 Apr 2023 10:46:49 GMT</pubDate>
            <atom:updated>2023-04-19T10:47:49.238Z</atom:updated>
            <content:encoded><![CDATA[<p>From this article we gonna understand :</p><ol><li>What is <strong><em>Circuit Breaker Pattern</em></strong>?</li><li><strong><em>Advantages </em></strong>of Circuit Breaker Pattern.</li><li><strong><em>States of </em></strong>Circuit Breaker ?</li><li>How Circuit Breaker <strong><em>works</em></strong> ?</li><li>How to <strong><em>configure </em></strong>Circuit Breaker ?</li></ol><h3><strong>What is Circuit Breaker Pattern ?</strong></h3><p>It is a design pattern used in software development ,API development and event-driven architecture. It is generally used for detecting(temporary failure such as backend failure) and preventing it from recurring.</p><h3><strong><em>Advantages </em></strong>of Circuit Breaker Pattern</h3><ol><li>Reliability Pattern</li><li>Out of the box configuration available for AMQ.</li><li>Save our resources by optimizing number of calls to the backend in case of multiple failures ,so that backend can have breathing space to work normally.</li></ol><h3><strong><em>States of </em>Circuit Breaker ?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*bIhy1ye6xXHcryLD8eZkwA.png" /></figure><p>We have Mainly <strong>3 states</strong> available :</p><p><strong><em>Closed</em></strong> : Initial state where the subscriber consume messages normally.</p><p><strong><em>Open</em></strong> : The subscriber doesn’t retrieve the messages until configured trip timeout.</p><p><strong><em>Half-open</em></strong>: The subscriber goes to half-open state after trip-timeout. In the next poll the subscriber will try to retrieve single message from the Q, and try to check of the backend has recovered or not . On single message success subscriber will go back to closed state else back to open state until next trip-timeout.</p><h3>How Circuit Breaker <strong><em>works</em></strong> ?</h3><p>The Circuit Breaker capability is bound to the error handling mechanism. You can bind any error to a circuit failure. For example, you can bind HTTP:CONNECTIVITY, MULE:UNKNOWN, or even a custom error , such as CIRCUIT_BREAKER:MYCUSTOM_ERROR etc.</p><p>If there is an error in the flow, the Subscriber checks if the error is for the defined ErrorTypes then it takes <strong><em>errorCount </em></strong>for the consecutive occurrences for that error until <strong><em>errorsThreshold </em></strong>is reached. When <strong>errorsThreshold </strong>is reached, the circuit trips and stops polling for new messages the duration specified by tripTimeout. After tripTimeout is over,the subscriber will try to retrieve single message from the Q, and try to check of the backend has recovered or not. Same cycle goes on until the backend is recovered.</p><h3>How to <strong><em>configure </em></strong>Circuit Breaker ?</h3><ol><li>Create a MQ in Anypoint Platform</li><li>Drag &amp; Drop subscribe operation (Anypoint MQ component) and create configuration for AMQ.</li><li>Configure Circuit Breaker 2 types: a) Global Referrence b) Component level reference/local reference.</li></ol><h4>Global Reference:</h4><p>All the <strong><em>subscriber </em></strong>can use this Reference to avail CBP:</p><p>Global Elements-&gt; Create-&gt;Component configuration-&gt;click on Circuit Breaker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*BcHHjdcanUjDZVdgsin3yg.png" /></figure><p>Fill up these details :</p><p><strong><em>On Error Type</em></strong>: Defined Error type which will decide the Circuit Breaker to trip.</p><p><strong><em>Error Threshold</em></strong>: This is the threshold after which the circuit will be opened.</p><p><strong><em>Trip timeout</em></strong>: How long the circuit will kept open.</p><p><strong><em>Trip timeout Unit</em></strong>: Unit for trip timeout</p><blockquote>at subscriber assign like this</blockquote><p>Component-&gt; Circuit Breaker -&gt; GLobal Reference</p><p>Global Reference -&gt; Circuit_breaker(global config)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CX80rGTXckdjQjZLxIXdfg.png" /></figure><h4>Component level reference/local reference :</h4><p>Component-&gt; Circuit breaker-&gt;Edit Inline-&gt; fill up error types, threshold, trip timeout and time unit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*C1ZEryyQN9NMS9G6fHTemg.png" /></figure><p>Deploy and we will see after 3 consecutive errors that the circuit is trip off (open) for 4 minutes and after 4 minutes the circuit will half close/open to check if the API is available or not. If the API is available it will close again to consume all the message, else it will be kept open and wait for the complete recovery.</p><blockquote>Connect me with more such content on my youtube channel:</blockquote><p><a href="https://youtube.com/@mulenerd">MuleNerd</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ch3esSEVbOWIhev3h6rlrQ.png" /><figcaption>Scan to visit my channel</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bc0999d3f31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Dataweave)Call private flow from dataweave ?]]></title>
            <link>https://medium.com/@mulesoft.nerd/dataweave-call-private-flow-from-dataweave-f178781ca578?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/f178781ca578</guid>
            <category><![CDATA[mulesoft-training]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Tue, 18 Apr 2023 14:57:23 GMT</pubDate>
            <atom:updated>2023-04-18T19:22:26.649Z</atom:updated>
            <content:encoded><![CDATA[<h3>(Dataweave) Call private flow from dataweave ?</h3><p>From this article we are gonna learn how to call private flow from dataweave using lookup() from Mule module of dataweave.</p><h3>lookup() :</h3><p>This function enables you to call a private flow within a Mule app and retrieve the resulting payload.</p><blockquote>syntax: lookup(flowName: String, payload: Any, timeoutMillis: Number = 2000(default))</blockquote><p>Steps to call lookup function in studio:</p><ol><li>Create a project in studio ie. lookup function</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P508s6Ah0J2MK8Xdd_I_mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*e-p-u5SYfkOiDBKwCCTFaA.png" /></figure><p>2. Under transform message write below code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*sWyiUato-eJy_6ADsVq4Xg.png" /></figure><p>3. Run and deploy and you can see in main flow logger it is calling the private flow :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*kckIEY6kkvm6j63MPuqSag.png" /></figure><blockquote>Note : The lookup function does not support calling subflows.</blockquote><p><em>To Understand </em><strong><em>more on this </em></strong><em>you can visit below </em><strong><em>lookup() </em></strong><em>video on my youtube channel</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fs3iRAPubECo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ds3iRAPubECo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fs3iRAPubECo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bcb7a68ac7c6ef31d77ed29c39cac62/href">https://medium.com/media/6bcb7a68ac7c6ef31d77ed29c39cac62/href</a></iframe><p><em>any suggestions ,comments are welcome, please let me know so that I can improve the learning</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f178781ca578" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Mulesoft) Know How to change order of your name like “Vijay Kulthe” to “Kulthe Vijay” vice…]]></title>
            <link>https://medium.com/@mulesoft.nerd/mulesoft-know-how-to-change-order-of-your-name-like-vijay-kulthe-to-kulthe-vijay-vice-11e4152c1907?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/11e4152c1907</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mulesoft-training]]></category>
            <category><![CDATA[mulesoft-esb]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Fri, 14 Apr 2023 10:02:33 GMT</pubDate>
            <atom:updated>2023-04-14T12:34:55.138Z</atom:updated>
            <content:encoded><![CDATA[<h3>(Mulesoft) Know How to change order of your name like “Vijay Kulthe” to “Kulthe Vijay” vice versa(Dataweave)</h3><p>From this article we are gonna learn dataweave scenario-1 where you will understand how we can change order of your name or any string like “Vijay Kulthe” to “Kulthe Vijay” via this dataweave script(we are going to use splitBy,joinBy etc).</p><h3>Input(String) :</h3><p>“Vijay Kulthe”</p><h3>Output (Expected String) :</h3><p>“Kulthe Vijay”</p><h3>Solution :</h3><p>Refer Below script</p><pre>%dw 2.0<br>output application/json<br>var myString = &quot;Vijay Kulthe&quot;<br>---<br>((myString splitBy  &quot; &quot;)[-1 to 0]) joinBy  &quot; &quot;</pre><p><strong>output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPhi66MJTjfHfW26xEJiYQ.png" /></figure><blockquote>To Understand more <strong>about this</strong> you can visit my youtube channel below</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5m8ZOo-iIhs&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5m8ZOo-iIhs&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2F5m8ZOo-iIhs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2384a52132329b8be9fe7066937f788d/href">https://medium.com/media/2384a52132329b8be9fe7066937f788d/href</a></iframe><p><em>any suggestions ,comments, alternate solution or code issues are welcome, please let me know so that I can improve the learning and code</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11e4152c1907" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Dataweave)splitBy() Vs joinBy() Guess Who Wins?]]></title>
            <link>https://medium.com/@mulesoft.nerd/dataweave-splitby-vs-joinby-guess-who-wins-6d480b957a9f?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d480b957a9f</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mulesoft-training]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 15:21:26 GMT</pubDate>
            <atom:updated>2023-04-13T15:21:26.185Z</atom:updated>
            <content:encoded><![CDATA[<p>From this article we are gonna learn how splitBy() &amp; joinBy() behaves completely <strong><em>opposite </em></strong>to each other.</p><h3>splitBy():</h3><blockquote><strong>splitBy</strong>is dataweave core function is used to split a string into an <strong>array of substrings</strong> based on a <strong>delimiter</strong>. The function takes <strong>two parameters</strong> - the string to be split and the delimiter used to split the string.</blockquote><p>Refer to below script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OGty62HwdAu7E4BSN5TBrg.png" /></figure><blockquote>To Understand <strong>more on this </strong>you can visit below <strong>splitBy </strong>video on my youtube channel</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fq_rElD2CPx0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dq_rElD2CPx0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fq_rElD2CPx0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a7cb9d882fa6a4f8183c552265a9826/href">https://medium.com/media/0a7cb9d882fa6a4f8183c552265a9826/href</a></iframe><h3>joinBy():</h3><blockquote><strong><em>joinBy </em></strong>is dataweave core function is used to <strong>join an array of strings</strong> into a single string using a delimiter. The function takes <strong>two parameters</strong> - the array of strings to be joined and the delimiter to be used for joining.</blockquote><p>Refer to below script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogWE-drP9c7MsOqCuZm6vg.png" /></figure><blockquote>To Understand <strong>more on this </strong>you can visit below <strong>joinBy </strong>video on my youtube channel</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FR41y_I-szQo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DR41y_I-szQo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FR41y_I-szQo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/95576f2a62390a95b69903851ca06ade/href">https://medium.com/media/95576f2a62390a95b69903851ca06ade/href</a></iframe><p><em>any suggestions ,comments are welcome, please let me know so that I can improve the learning</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d480b957a9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Dataweave) String Operations(String reversal, String Array Reversal)]]></title>
            <link>https://medium.com/@mulesoft.nerd/dataweave-string-operations-string-reversal-string-array-reversal-3b84e3ef4f7f?source=rss-1c58b419a465------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b84e3ef4f7f</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[dataweave]]></category>
            <category><![CDATA[mulesoft-training]]></category>
            <dc:creator><![CDATA[Vijay Kulthe]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 05:01:24 GMT</pubDate>
            <atom:updated>2023-04-13T05:01:24.417Z</atom:updated>
            <content:encoded><![CDATA[<p>From this article we are gonna learn how to String reversal, String Array Reversal in Dataweave script.</p><h3>Reverse String :</h3><p>Refer Below script to reverse string:</p><pre>%dw 2.0<br>output application/json<br>/*<br>1) String is nothing but character array.<br>2) Variable &#39;myString&#39; will store the string value.<br>3) Script logic will change the string in reverse order.<br>*/<br>var myString = &quot;Vijay Kulthe&quot;<br>---<br>myString[-1 to 0]</pre><p>Output :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0czOvdtKXr8faKI-TMdGw.png" /></figure><h3>Reverse String Array :</h3><p>Refer Below script to Reverse String Array :</p><pre>%dw 2.0<br>output application/json<br>/*<br>1) String is nothing but character array.<br>2) Variable &#39;myStringArray&#39; will store the string value.<br>3) Script logic will change the string in reverse order.<br>*/<br>var myStringArray = [&quot;Vijay&quot;, &quot;Kulthe&quot;]<br>---<br>myStringArray[-1 to 0]</pre><p>Output :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z4uqbcON_H1RqIMbKvJ1yQ.png" /></figure><blockquote>To Understand <strong>more on this </strong>you can visit below video on my youtube channel</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FT6A5zw8WEqQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DT6A5zw8WEqQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FT6A5zw8WEqQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/724f5248a21ddfa096788e98646a9499/href">https://medium.com/media/724f5248a21ddfa096788e98646a9499/href</a></iframe><blockquote>Also do checkout the <strong>range selector</strong> video to understand it in depth:</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FB5Bz28dVyys%3Fstart%3D39%26feature%3Doembed%26start%3D39&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DB5Bz28dVyys&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FB5Bz28dVyys%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8f6a9fc90815f81758751aabbd288b1a/href">https://medium.com/media/8f6a9fc90815f81758751aabbd288b1a/href</a></iframe><p><em>any suggestions ,comments, alternate solution or code issues are welcome, please let me know so that I can improve the learning and code</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b84e3ef4f7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>