<?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 Ramineniuday on Medium]]></title>
        <description><![CDATA[Stories by Ramineniuday on Medium]]></description>
        <link>https://medium.com/@ramineniuday777?source=rss-b68a9cee1403------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*10dXo_iONGU59TGc</url>
            <title>Stories by Ramineniuday on Medium</title>
            <link>https://medium.com/@ramineniuday777?source=rss-b68a9cee1403------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:14:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ramineniuday777/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[Error Handling with Mulesoft — Part 2]]></title>
            <link>https://medium.com/@ramineniuday777/error-handling-with-mulesoft-part-2-a72fdc2c6497?source=rss-b68a9cee1403------2</link>
            <guid isPermaLink="false">https://medium.com/p/a72fdc2c6497</guid>
            <dc:creator><![CDATA[Ramineniuday]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 05:14:52 GMT</pubDate>
            <atom:updated>2023-09-20T05:14:52.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>Error Handling with Mulesoft — Part 2</h3><p>In the previous article i have explained about on-error-continue and on-error-propagate. In this article i have explained about the below concepts.</p><ol><li><strong>Mule Default Error handling</strong></li><li><strong>Global error handling</strong></li><li><strong>Raise error</strong></li></ol><blockquote><strong>“Mule Default Error Handling:”</strong></blockquote><ol><li>if a flow is called by any other sub flow and in the sub flow if any error occurs , then first it will check whether anything is present in the error handling part or not.</li></ol><p>2. if any thing is present in the error handling part then check if particular error is handled or not.</p><p>3. if not handled it will raise as an error to the calling flow and then checks in the error handling part again that particular error is handled or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ko51mzO1ssKibJ7f6tB7cw.png" /><figcaption>In this example it uses <strong>default error handler.</strong></figcaption></figure><p>4. if not then it Mulesoft uses it’s default error handling , for success response it will give 200 as status code with current payload and for failure response it will give 500 as status code and give error description as output as the response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WdufwhfOOH2sfHuNkd-Ghw.png" /><figcaption>It will use http listener responses for success and failure responses.</figcaption></figure><p>5. we can modify accordingly the http listener responses tab to get the output.</p><blockquote><strong>“Global error handling:”</strong></blockquote><ol><li>In this Global error handling, instead of handling the errors at the flow level we can use the global error handler to handle the error’s.</li></ol><p>2. If we think that particular error handler is used by only single project, then we can include for each of the flow by adding error handling in config file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PcrTRmiqQcSMQYHu6lgwCw.png" /><figcaption>Global error handler</figcaption></figure><p>3. Add the global error handler in the flow by adding the configuration file in global elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEa83e9FC5RT3GAIrO5bwA.png" /><figcaption>Global error handler is referenced in the flow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Goj9z2WL3M8AQEiXM9_9LQ.png" /><figcaption>Configuration file added in global elements</figcaption></figure><p>3. If we think that particular error handler is used by many or different projects , then we can publish the developed error handler to Anypoint exchange and we can use in the projects by adding dependency and import it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*BTYeZugWObtmG4ZWLfwGRg.png" /><figcaption>dependency needs to be added in pom.xml file</figcaption></figure><p>4. After that import the project like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*acGmQB0Fakt8-lHEuonTRw.png" /></figure><p>5. Under project libraries section, we would be able to see the error handler library added.</p><blockquote><strong>“Raise error:”</strong></blockquote><ol><li>Some times , we came up in a situation to raise an error at that time we can use raise error connector to manually the raise the error’s in the flow.</li></ol><p>2. We can create our own custom errors with name space and indentifier and handle it in the flows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AzVXBMJD5KgpDRLAe4rrXQ.png" /></figure><p>3. “ABC:CONNECTIVITY” needs to be added in the error handling part , if that particular error what we raised is to be handled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7CvOuPWp80qGYrK9Z9Wvg.png" /><figcaption>ABC:CONNECTIVITY is handled in the global error handler</figcaption></figure><p>Please provide feedback. It will help to improve the content.</p><p>Thank you for reading this article! If you found this response useful, please consider giving it a ‘<strong>clap</strong>’ and <strong>Follow </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a72fdc2c6497" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One-way TLS and Two-way TLS in Mulesoft]]></title>
            <link>https://medium.com/@ramineniuday777/one-way-tls-and-two-way-tls-in-mulesoft-d2b5ba0f4371?source=rss-b68a9cee1403------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2b5ba0f4371</guid>
            <category><![CDATA[one-way-ssl]]></category>
            <category><![CDATA[two-way-ssl]]></category>
            <category><![CDATA[security-token]]></category>
            <category><![CDATA[certificate-authority]]></category>
            <category><![CDATA[certificate]]></category>
            <dc:creator><![CDATA[Ramineniuday]]></dc:creator>
            <pubDate>Fri, 02 Jun 2023 11:11:43 GMT</pubDate>
            <atom:updated>2023-06-02T11:11:43.439Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article we will focus on the role of one-way and two-way TLS in API Integrations and their implementation in MuleSoft. TLS is a cryptographic protocol that provides end-to-end security of data sent between applications over the Internet. It is mostly familiar to users through its use in secure web browsing, and in particular the padlock icon that appears in web browsers when a secure session is established.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/0*RAksm_Nbx5mG9s4v" /><figcaption>Padlock icon in browser</figcaption></figure><p><strong>Key store and Trust store:</strong></p><p><strong>Key store:</strong> is used to store private key and identity certificates that a specific program should present to both parties (server or client) for verification.</p><p><strong>Trust store:</strong> It is used to store certificates from Certified Authorities (CA) that verify the certificate presented by the server in an<strong> </strong>SSL connection</p><blockquote><strong>“How to generate the self-signed certificate.”</strong></blockquote><p>In order to generate the self-signed certificates we will be using a key tool like JKS or PKCS12 to generate the certificates.</p><p><strong>One way TLS:</strong></p><blockquote>“In one way TLS the client always verifies the server certificates but server never verifies the client certificates.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/0*U4IVmurFTAAHN7Oe.png" /><figcaption>One Way TLS</figcaption></figure><p><strong>Generate server keystore:</strong></p><p>keytool -genkey -alias mule-server -keyalg RSA -keystore C:\certs\server-keystore.jks</p><p>it will ask for the below details and press enter you will be able to see server-keystore.jks in that specific folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXHZFQSyFhtUskKwIEptlw.png" /></figure><p><strong>Extract public key from Keystore:</strong></p><p>keytool -export -alias mule-server -keyalg RSA -keystore C:\certs\server-keystore.jks -file C:\certs\server_trust.crt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6N-my3Mob8OwvXhSb57oUQ.png" /></figure><p><strong>create trust store for client:</strong></p><p>keytool -import -alias mule-server -keyalg RSA -keystore C:\certs\client-truststore.jks -file C:\certs\server_trust.crt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7QMRX0MMQ1nqAUjkNcWuA.png" /></figure><p><strong>Configuring trust store and key store to Mulesoft http listener and requester.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*UN-5vXpzwPd_eB7UjbJs9A.png" /></figure><ol><li>Add the server keystore and client trust store to src/main/resources.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rk95zRzO3DYchWhmd0BJqQ.png" /></figure><p>2. Add the trust store to http requestor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCWoLK002kHDCdDWe9F-NQ.png" /></figure><p>3. Add the server keystore to http listener under TLS configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fnShFgX3v3CFmIUOfkVqvw.png" /></figure><p>4. After adding all the things when we send the request from client to server it will response back the success message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hbzYOrFFLdsGYRQfc9lHpw.png" /></figure><p><strong>Two way TLS:</strong></p><blockquote>“In Two way TLS client and server authenticate or exchange the certificates with each other.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PX93R3FPrV-mBP0q.png" /><figcaption>Two Way TLS</figcaption></figure><p><strong>Generate server keystore:</strong></p><p>keytool -genkey -alias mule-server -keyalg RSA -keystore C:\certs\server-keystore.jks</p><p>it will ask for the below details and press enter you will be able to see server-keystore.jks in that specific folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXHZFQSyFhtUskKwIEptlw.png" /></figure><p><strong>Extract public key from Keystore:</strong></p><p>keytool -export -alias mule-server -keyalg RSA -keystore C:\certs\server-keystore.jks -file C:\certs\server_trust.crt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6N-my3Mob8OwvXhSb57oUQ.png" /></figure><p><strong>create truststore for client</strong></p><p>keytool -import -alias mule-server -keyalg RSA -keystore C:\certs\client-truststore.jks -file C:\certs\server_trust.crt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7QMRX0MMQ1nqAUjkNcWuA.png" /></figure><p><strong>Generate client keystore:</strong></p><p>keytool -genkey -alias mule-server -keyalg RSA -keystore C:\certs\client-keystore.jks</p><p>it will ask for the below details and press enter you will be able to see client-keystore.jks in that specific folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPwCYxQvX4xTp81O_EghaA.png" /></figure><p><strong>Extract public key from client Keystore:</strong></p><p>keytool -export -alias mule-server -keyalg RSA -keystore C:\certs\client-keystore.jks -file C:\certs\client_trust.crt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9j-ykhgv9oHFc4ZVeVtcw.png" /></figure><p><strong>create trust store for server:</strong></p><p>keytool -import -alias mule-server -keyalg RSA -keystore C:\certs\server-truststore.jks -file C:\certs\client_trust.crt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7v1Shir-xRmF0iGJboNd5g.png" /></figure><p><strong>Configuring trust store and key store to Mulesoft http listener and requester.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*UN-5vXpzwPd_eB7UjbJs9A.png" /></figure><ol><li>Add the server keystore and client trust store to src/main/resources.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6L2jz9h-HXdBF6fpFZcS-Q.png" /></figure><p>2. Add the client trust store and key store to http requestor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diY4c3-9gmJYqhVDBo8FIQ.png" /></figure><p>3. Add the server keystore and truststore to http listener under TLS configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CywYfbmuFGRnIHEv0Avi1g.png" /></figure><p>4. After adding all the things when we send the request from client to server it will response back the success message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_pfMnBPvDn6bsUUfWzVm3Q.png" /></figure><blockquote>“Things need to be taken care in order to test this successfully.”</blockquote><p>We will get the error like “No localhost” in the output in order to avoid these we need to add one argument in VM arguments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dMQAxgg32p4Vb8bPD1SmQQ.png" /></figure><p>In order to</p><p>Please provide feedback. It will help to improve the content.</p><p>Thank you for reading this article! If you found this response useful, please consider giving it a ‘<strong>clap</strong>’ and <strong>Follow </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2b5ba0f4371" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Error Handling in Mulesoft]]></title>
            <link>https://medium.com/@ramineniuday777/error-handling-in-mulesoft-e301d5918b6?source=rss-b68a9cee1403------2</link>
            <guid isPermaLink="false">https://medium.com/p/e301d5918b6</guid>
            <category><![CDATA[errores]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[error]]></category>
            <category><![CDATA[status-code-500]]></category>
            <category><![CDATA[error-handling]]></category>
            <dc:creator><![CDATA[Ramineniuday]]></dc:creator>
            <pubDate>Fri, 19 May 2023 08:58:02 GMT</pubDate>
            <atom:updated>2023-05-19T08:58:02.018Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article i will be going to explain about error handling in mulesoft and how we can handle the error’s with different error handling connectors.</p><p>The process of handling error’s in the flow and responding back with user friendly messages instead of system error messages is known as <strong>Error Handling.</strong></p><p>When ever an error occured in the flow an error object is created. The error object contains many properties. Eg: <strong>error.errordescription</strong> ,<strong>error.errorType </strong>etc.</p><p>Error types are identified by namespace and identifier. Example HTTP:UNAUTHORIZED</p><p><strong>HTTP Listener Response Tab:</strong></p><p>It consist of two parts success response and error response.</p><p>For success response the output will be payload with 200 OK and for failure scenario the output will be error.description with 500 status code.</p><blockquote>“We can modify accordingly in the http listener responses tab for responses and error responses based on our requirement.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qVEqnu0P_Y-uGkfk_eZwTQ.png" /></figure><p><strong>Now we will see the above scenario with an example for success scenario and Failure scenario.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sGCGboOdipS9RMrj5GJJGA.png" /></figure><p>This is the output i was getting when i tested the flow from postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9i-pajJaHscUeraHshZtUA.png" /></figure><p>I have modified the Responses tab of responses with payload.data. so this is what iam getting. we can change accordingly to our requirement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zDYxSvXAyfR1keGh1u9XnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*czPwKtclabVXldWdDS1tjA.png" /></figure><p>when ever an error is occured it will give the error description as output which is in the http listener error response tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1idXpDEB-41p7CgAI-RLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zMggKra3ZeuxA_W8uSAJbg.png" /></figure><p><strong>Remember: </strong>The error will route to error-handling only if it identifies that the errorType of that error is handled or not.</p><p>Mule 4 has an excellent feature that it identifies all the types of errors that occur within that flow by looking at what kind of connectors are used in the flow.</p><blockquote>“If we have only single flow. Then on-error-propagate and on-error-continue behaves in the same way, instead on-error-continue gives 200 status and error-propagate gives 500 status code. even it is on-error-continue it will not go to the next processor within the same flow.”</blockquote><p><strong>Error handling scopes:</strong></p><ul><li>on error continue</li><li>on error propagate</li></ul><p><strong>On error continue:</strong></p><p>There are some scenarios where we want to continue the flow at that time we go for on error continue. The other important thing to remember is on error continue will always give the current payload as the output which is set in http listener response tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_mBbl9A5cFxw9K3ooTiMOQ.png" /></figure><p>Then it will go to the logger part of the calling flow as it is on-error-continue it will not execute in the error flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yw-MVl3v7jQGl2NO7yip-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQlxnGCekGYt_ASPFuNdaw.png" /></figure><p>It has given the current payload as output with 200 status code as it is on-error-continue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qLN6Hs2XZN1us8qoat3Kaw.png" /></figure><p>If we remove the error handling part from the sub-flow part. it check whether is anything present in the error handling part if not it will raise error to the calling flow and checks if anything present in the error handling part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7XIch83UgNcX_S94Fwagg.png" /></figure><p>The current payload is same what we are sending from postman. That’s why we are getting same payload with 200 status code in output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*heNEhjIqy6U4QHVKLPiEIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pe4azh3osf0NuzThrO2lJw.png" /></figure><p><strong>On error propagate:</strong></p><p>Suppose if our flow is called using flow reference it will raise as an error to the calling flow when we use on-error-propagate and it will always give the error description and 500 as status code in the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xjb5FIKnI35gQssY76eQIg.png" /></figure><p>If nothing is there in the error handling part mule will use it’s default error handling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4tCFhfaIG4JPZTAbAx9MHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAW9dx2i7ywsPy872F8gOQ.png" /></figure><p><strong>Error Mapping :</strong></p><p>Suppose if we are having more http requestor connectors in an application when an error occurred in the application and it’s showing error on http requestor connector but in an application it consist of more http requestor connector’s.</p><p>At that time error mapping will help us with mapping HTTP:CONNECTIVITY to ABC:CONNECTIVITY I have taken example as HTTP Connectivity similarly you can do mapping for multiple error types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pc74y1KJd_9Uo8_tXHqUrA.png" /></figure><p>Please provide feedback. It will help to improve the content.</p><p>Thank you for reading this article! If you found this response useful, please consider giving it a ‘<strong>clap</strong>’ and <strong>Follow </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e301d5918b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Munit Testing with Mule4 for JMS Connector]]></title>
            <link>https://medium.com/@ramineniuday777/munit-testing-with-mule4-for-jms-connector-2d6355fe7b07?source=rss-b68a9cee1403------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d6355fe7b07</guid>
            <category><![CDATA[munit]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[queue]]></category>
            <category><![CDATA[jms]]></category>
            <category><![CDATA[jms-munit-testing]]></category>
            <dc:creator><![CDATA[Ramineniuday]]></dc:creator>
            <pubDate>Fri, 12 May 2023 12:18:15 GMT</pubDate>
            <atom:updated>2023-05-12T12:18:15.413Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*7kHAHrzmFwhG3b1x-kuxog.jpeg" /></figure><p>MUnit is a Mule Application Testing Framework that allows you to easily build automated tests for your Integration and APIs. Munit framework provides a full suite of integration and unit test capabilities , and is fully integrated with maven for continuous deployment.</p><p>MUnit is fully integrated with Anypoint Studio and allows you to create, design, and test your MUnit tests just like you would Mule Applications.</p><p>please refer the MuleSoft documentation to know more about MUnit: <a href="https://docs.mulesoft.com/munit/2.3/">click here</a></p><p>With MUnit you can:</p><p>• Create your test by writing Mule code<br>• Mock processors<br>• Spy any processor<br>• Verify processor calls<br>• Enable or ignore particular tests<br>• Check visual coverage in Studio<br>• Generate coverage reports</p><p>MUnit is divided in two main sub modules:</p><p>• MUnit<br>• MUnit Tools</p><p>So, whenever we create a blank test for MUnit or record the MUnit it will add all the necessary Munit dependencies and plugins in the pom.xml</p><p><strong>In this article, I’ll show you how to create and run an MUnit test for JMS connector.</strong></p><blockquote>“In this I&#39;m going to explain about the scenario when we have jms publish operation where we will publish the data and flow ends and the flow will not go to the consume operation, so this article will helps in how we can consume the data.”</blockquote><h3>How to Create MUnit Test for Mule Flow with JMS Publish connector.</h3><ol><li>Create a project in Anypoint Studio. The flow looks like, as shown below.</li></ol><figure><img alt="dsdght" src="https://cdn-images-1.medium.com/max/1024/1*frMnb3UUDf36IvnUTL_EwA.png" /></figure><p>2. Right-click on the flow and select MUnit -&gt; Create blank test for this flow. this will create an MUnit test suite, which will be present in src/test/munit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1AN3Ck8BmPlZZharl2AGNg.png" /></figure><p>3. Search for the verify call in the mule palette. Drag and drop it in the validation section of the jms-demo-test-suite flow and check whether it is called at least once or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dv1qcuvioJMAJhoapPSXaQ.png" /></figure><p>4. Run the jms-demo-test-suite and see the flow is covered successfully or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I479HRNOxhoGVy9VV6qacA.png" /></figure><p>5. As we are publishing some data into the jms publish connector it needs to be consumed somewhere else in the flow or outside of the application. How we can do that ?</p><p>6. when we use flow-reference with the help of flow-reference in between the flow it can go from one flow to another flow. But when we use jms publish connector the data is published to that and flow stops. The consume operation(On New Message)will not start.</p><p><strong>In this i will explain how we will consume the published data using jms connector.</strong></p><p>7. Mock the JMS publish connector using mock when and scroll down a bit then you would be able to see then call option select the consumer flow named implentation flow in this example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rw2wxX_4tUZYsBdF5IcemA.png" /></figure><p>8. so, once you select the Then call option and flow name and run the Munit after mocking the publish operation it will be moved to the implementation flow where consumer operation is present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PA-T0BHf1cHomu2uLBjf_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8-83rAMxtSQZznXXTtbxQ.png" /></figure><p>9. this is how we write Munit’s for JMS publish and consume connectors.</p><blockquote>“suppose if we are having multiple publish connectors in a mule application and those published data is consumed in some other application or some other place then we can simply verify whether the publish operation is executed successfully or not by using Munit verify call connector.” below image is the example of such scenarios.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PDC4t5jNI3o6HQ7DXeVDtA.png" /></figure><p>Please provide feedback. It will help to improve the content.</p><p>Thank you for reading this article! If you found this response useful, please consider giving it a ‘<strong>clap</strong>’ and <strong>Follow </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d6355fe7b07" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>