<?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 Pinak Acharya on Medium]]></title>
        <description><![CDATA[Stories by Pinak Acharya on Medium]]></description>
        <link>https://medium.com/@pinak575?source=rss-4ea723fffeb5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NuAnYxZ_C8rlmVKMlLlSSA.jpeg</url>
            <title>Stories by Pinak Acharya on Medium</title>
            <link>https://medium.com/@pinak575?source=rss-4ea723fffeb5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:47:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pinak575/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[CloudHub 1.0 VS CloudHub 2.0]]></title>
            <link>https://medium.com/@pinak575/cloudhub-1-0-vs-cloudhub-2-0-79f98114efb2?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/79f98114efb2</guid>
            <category><![CDATA[cloudhub]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mule-esb]]></category>
            <category><![CDATA[new-features]]></category>
            <category><![CDATA[anypoint-platform]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Sat, 29 Apr 2023 18:11:54 GMT</pubDate>
            <atom:updated>2023-04-29T18:11:54.033Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>***Feature comparison***</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*ZIqDSKKDVeLDrk3KPlweFQ.jpeg" /></figure><p><strong>***Enhancements in Cloudhub 2.0 over ch1.0:***</strong></p><ol><li>More granular vCore allocation options you can now have the option to assign 0.5, 1.5, 2.5, 3.5 and 4 vCores (on top of the current vCore levels) to your applications.</li></ol><p>2. Every Private space has its load balancer (assigned automatically) for inbound traffic, called Private Ingress.</p><p>3. With the introduction of clustering support in CH 2.0, you will run your apps across multiple replicas to enable scaling (horizontal and vertical), load balancing, and high availability.</p><p>4. Container-based application deployment to regulate resource consumption, ensure application availability, and enable scalability</p><p><strong><em>Each worker(ch 1.0 worker ) now called replica (ch 2.0) is a Eks based K8 instance under the hood .While previously each worker was a dedicated VM instance of EC2.</em></strong></p><p>***Things to Ponder:***<br>Unfortunately, there is no automatic option to migrate your existing infrastructure (VPC/VPN/DLB) from CloudHub 1.0 to CloudHub 2.0. Therefore, you would need to create and configure a new private space, set up a new VPN, and update your applications, as discussed above, before deploying them to the new runtime.</p><h3>Benefits of MuleSoft CloudHub 2.0</h3><ul><li>Provides for deployments across 12 regions globally.</li><li>Dynamically scales infrastructure and built-in services up or down to support elastic transaction volumes.</li><li>Builds in security policies, protecting your services and sensitive data with encrypted secrets, firewall controls, and restricted shell access.</li><li>Encrypts certificates, passwords, and other sensitive configuration data at rest and in transit within Anypoint Platform.</li><li>Provides a standardized isolation boundary by running each Mule instance and service as a separate container.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79f98114efb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top Enterprise Integration Patterns]]></title>
            <link>https://medium.com/@pinak575/top-enterprise-integration-patterns-ae68ae7f650e?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae68ae7f650e</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[integration-patterns]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Thu, 09 Mar 2023 19:58:51 GMT</pubDate>
            <atom:updated>2023-04-02T17:42:44.322Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Integration Pattern:</strong><br>* An Integration pattern is a proven solution for the existing problem.</p><p>*Integration patterns talk about how easily we can take care of integration maintenance, enhancement, and performance when we choose the right integration pattern to build a robust integration.<br>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —<br><strong>Top integration patterns:</strong></p><h4><strong>1. Aggregation Pattern:</strong></h4><ul><li>Aggregation pattern as the name suggests aggregates the data from a different system and merges them before processing the response where the response can be insertion e.g. Reporting or as a Response e.g. HTTP response.</li><li>The MuleSoft Aggregators module provides three types of Aggregators that collect and release the data depending on the conditions configured.</li></ul><h4>Type of Aggregators:</h4><p><strong>* Size-Based Aggregator</strong> aggregates the data until predefined size limits are reached, executing routes and listeners.<br><strong>* Time-Based Aggregator</strong> aggregates the data until the time period is completed, executing routes and listeners.<br><strong>* Group-Based Aggregator</strong> aggregates in the group according to GroupId, executing routes and listeners.</p><p><strong>2. Relaibility Pattern:<br></strong>The reliability pattern as the name suggests makes the MuleSoft API/Application more reliable by providing Transactional support when Non-Transactional transport is used in the MuleSoft application.</p><p><strong><em>A reliability pattern couples a reliable acquisition flow with an application logic flow.</em></strong></p><ul><li>The reliable acquisition flow (the left side of the diagram) delivers a message reliably from a Mule event source that does not implement transactions to an outbound operation of a connector that implements transactions. The operation can be of any type of transactional endpoint, such as VM or JMS.</li><li>The application logic flow (the right side of the diagram) delivers the message from the event source that uses a transactional connector to the business logic for the application.</li></ul><h4>Reliable Messaging</h4><p>If your application uses a transactional connection such as JMS, VM, or DB, reliable messaging is ensured by the built-in support for transactions in the connector. This</p><p><strong>2. Bidirectional Sync:</strong><br>Bi-Directional Sync is a pattern where data flow from the Source system to the Target system and later from the Target system to the Source system.</p><p>We can define Bi-Directional Sync in the following steps:<br>1. The source system sends a request to the Target system<br>2. The target system processes the request<br>3. The target system sends the response back to the Source system</p><p><strong>4.BroadCast Pattern:</strong><br>The broadcast pattern is moving data from one source system to many target systems.</p><p>The broadcast pattern is extremely valuable when system B needs to know some information in near real-time that originates or resides in system A.</p><p>For example, you may want to create a <a href="https://www.mulesoft.com/platform/api/api-analytics">real-time reporting dashboard</a> — a destination of multiple broadcast applications that receives real-time updates on what is going on across multiple systems.</p><p><strong>5. Migration pattern:<br></strong>Is also known as a <strong>unidirectional migration pattern</strong> as it only talks about transferring data from the source system to the target system and not vice-versa.<br><a href="https://mulesy.com/1-batch-job-processing-in-mulesoft/">Batch Jobs</a> is the widely used activity in MuleSoft for migrating data from one system to another as it provides the highest throughput because of parallel execution. <a href="https://mulesy.com/1-batch-job-processing-in-mulesoft/">Batch Jobs</a> is the widely used activity in MuleSoft for migrating data from one system to another as it provides the highest throughput because of parallel execution.</p><h4>6. Correlation pattern:</h4><p>The correlation data integration pattern is a design that identifies the intersection of two data sets and does a bi-directional synchronization of that scoped dataset only if that item occurs in both systems naturally.</p><p>The correlation data integration pattern is useful when you have two groups or systems that want to share data only if they both have a record representing the same item/person in reality.</p><p>The correlation data integration pattern is most useful when having the extra data is more costly than beneficial because it allows you to scope out the “unnecessary” data.</p><p>Reference:<br><a href="https://docs.mulesoft.com/mule-runtime/4.4/reliability-patterns">https://docs.mulesoft.com/mule-runtime/4.4/reliability-patterns</a><a href="https://mulesy.com/3-bi-directional-sync-pattern/">https://mulesy.com/3-bi-directional-sync-pattern/</a><br><a href="https://www.mulesoft.com/resources/esb/top-five-data-integration-patterns">https://www.mulesoft.com/resources/esb/top-five-data-integration-patterns</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae68ae7f650e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Twilio Integration in Mule4:]]></title>
            <link>https://medium.com/@pinak575/twilio-connector-in-mule4-2b1722a588f6?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b1722a588f6</guid>
            <category><![CDATA[twilio-integration]]></category>
            <category><![CDATA[anypoint]]></category>
            <category><![CDATA[mule4]]></category>
            <category><![CDATA[connector]]></category>
            <category><![CDATA[twilio]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Fri, 07 Oct 2022 06:36:38 GMT</pubDate>
            <atom:updated>2022-11-12T07:09:23.180Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Twilio is a cloud-based service that enables assertive communication between mobile devices, applications, services, and systems throughout the business to bridge the gap between conventional transmission.</strong></h4><p><em>Twilio provides the platform for communication using the communication APIs, where we can send or receive a text, place or receive a call or kick-o a conversation over chat, and perform many more communication functions!</em></p><p>Anypoint Connector for Twilio (Twilio Connector) provides an interface to the Twilio REST API, which enables you to create connectivity between Twilio and third-party SaaS applications, CRM solutions, and more.</p><p>Anypoint Connector for Twilio (4.2) provides an interface to the Twilio REST APIs, enabling the users to create connectivity between Twilio and other platforms and serve as an intermediary for connecting to various communication channels.</p><p>Supported Operations:</p><p><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsAddressesJsonByAccountSidSid">Update Address</a> <a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsJsonByAccountSidSid">Update Call</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsPaymentsJsonByAccountSidCallSidSid">Update Payments</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsPaymentsjsonByAccountSidCallSid">Create Payments</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsRecordingsJsonByAccountSidCallSidSid">Update Call Recording</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsRecordingsjsonByAccountSidCallSid">Create Call Recording</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsjsonByAccountSid">Create Call</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsConferencesJsonByAccountSidSid">Update Conference</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsAddressesjsonByAccountSid">Create Address</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsApplicationsJsonByAccountSidSid">Update Application</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsApplicationsjsonByAccountSid">Create Application</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsFeedbackSummaryjsonByAccountSid">Create Call Feedback Summary</a><br><a href="https://docs.mulesoft.com/twilio-connector/4.2/twilio-connector-reference#Create20100401AccountsCallsFeedbackjsonByAccountSidCallSid">Update Call Feedback</a> and <strong>many more</strong></p><p>Points To ponder:<br><strong><em>1.Mule4 Twilio connector enables to Integrate of enterprise data for Communication over messaging service Twilio.</em></strong></p><p><strong><em>2. Supports Varied comprehensive operations in the connector to Consume Twilio RestApi.</em></strong></p><p><strong><em>3. Uses HTTP Protocol for data transfer for inbound and outbound data.</em></strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Reference:<br><a href="https://www.anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-twilio-connector/">https://www.anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-twilio-connector/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b1722a588f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Drive Connector, Configuration, and Operations]]></title>
            <link>https://medium.com/@pinak575/google-drive-connector-1-0-742f7fa5e1ca?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/742f7fa5e1ca</guid>
            <category><![CDATA[google-drive-connector]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[google-drive]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Sat, 11 Jun 2022 12:16:52 GMT</pubDate>
            <atom:updated>2022-06-12T11:04:43.235Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Google Drive Connector</strong> <strong>1.0 </strong>enables you to automate business processes between Google Drive (Drive) and other enterprise applications, either on-premises or in the cloud. Using the Google Drive connector, you can programmatically access and upload content and relevant information to and from Drive.</p><p><strong>Authentication Types: </strong>Google Drive Connector uses the OAuth 2.0 authentication connection type, which uses access tokens provided by the authorization server to access protected data.</p><p><strong>Support Category: </strong><a href="https://www.mulesoft.com/legal/versioning-back-support-policy#anypoint-connectors"><strong>Select</strong></a><strong>.</strong></p><p><strong>Steps to Configure Google Drive connector:</strong></p><ol><li>) Create an application in the Google Cloud Platform (GCP) Console <a href="https://console.cloud.google.com/apis/dashboard?pli=1">https://console.cloud.google.com/apis/dashboard?pli=1</a></li><li>Get Oauth Credentials for GCP web application Created.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z-id66rcXzEDtpIhkneGtw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UvbxDEXwmVyaQFE2hAoURg.jpeg" /></figure><p>Open GOOGLE DRIVE connector Configuration:</p><p>2.) Provide Consumer Key and Consumer Secret generated in connector configuration.<strong>{Here Consumer Key = ClientId Id and Consumer Secret=Client secret}.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*_SEz_CEpKVgEDsQGFAza8Q.jpeg" /></figure><p>3.) Provide Google Authorization and Token Url <strong>{Autofilled in Connector}.</strong></p><p>4.) Now, Perform <strong>HTTP</strong> listener configuration.</p><p>5.) In oAuthCallBackConfig, add the listener config that was created in step 4</p><p>6.) Provide call back path = <strong>/callback</strong></p><p>7.) Provide Authorize path = <strong>/authorize</strong>. Add scopes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*fvn6vWkKHecw8avy4uy3GA.jpeg" /></figure><p>8.) External Call Back Url will be<strong> </strong><a href="http://localhost:8081/callback"><strong>http://localhost:8081/callback</strong></a> (if HTTP listener on port 8081).</p><p>9.) Make sure the <a href="http://localhost:8081/callback">http://localhost:8081/callback</a> URL is added to google console call-back URLs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*nCEL_qdHZEpOoeoKthdvBA.jpeg" /></figure><p>Above is the GCP snip.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Perform oAuth-dance on Browser:</p><ol><li>Call endpoint: <a href="http://localhost:8081/authorize."><strong>http://localhost:8081/authorize.</strong></a></li><li>Given a set of Permissions to the web app.</li><li>Authorization tokens will be received.</li><li>Google Drive connector is ready to be used.</li></ol><p>References:</p><ul><li><a href="https://docs.mulesoft.com/google-drive-connector/1.0/google-drive-connector-reference">Google Drive Connector 1.0 Reference</a></li><li><a href="https://help.mulesoft.com/s/question/0D72T000004DEvzSAG/detail">MuleSoft Help Center</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=742f7fa5e1ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mule3 to Mule4 Migration:]]></title>
            <link>https://medium.com/@pinak575/mule3-to-mule4-migration-8452f754cbf6?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/8452f754cbf6</guid>
            <category><![CDATA[mule-migration-assistant]]></category>
            <category><![CDATA[mule-migration]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mule]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Sat, 07 May 2022 11:45:30 GMT</pubDate>
            <atom:updated>2022-05-28T07:37:03.787Z</atom:updated>
            <content:encoded><![CDATA[<p>Mule4 is the Evolution of Mule3, Mule4 improvements make it easier to learn, develop, and manage than Mule 3.</p><p><strong>The high-level changes in Mule 4 from Mule3:</strong></p><ul><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/intro-mule-message">Mule Message</a><br>The Mule Message structure has evolved to make it easier to work with properties and to provide more consistency across connectors.</li><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/intro-expressions">Expression language</a><br>The Mule Expression Language has been replaced with the DataWeave language so that you work with data and learn Mule more easily.</li><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/intro-connectors">Connectors</a><br>The approach to connectivity was unified in Mule 4.</li><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/intro-error-handlers">Error Handling</a><br>Easier and more powerful error handling with a new Try scope.</li><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/intro-dataweave2">DataWeave</a><br>DataWeave includes minor changes to simplify the syntax and make it easier to learn.</li><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/intro-engine">Runtime engine</a><br>The internal execution engine has been updated with a new self-tuning and non-blocking reactive engine. This allows for better performance and scalability out-of-the-box.</li></ul><h3><strong>Benefits include:</strong></h3><ul><li>Easier and faster app development</li><li>Seamless access and data mapping</li><li>Simplified connectivity</li><li>Up to 50% fewer steps and concepts to learn than Mule 3</li></ul><p><strong>Difference Between Mule3 and Mule4 Event:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*B258nbVEEKyioXYwFDXu6A.jpeg" /></figure><p><strong>MuleMigration Assistant:</strong></p><p><em>Mule Migration Assistant is an open-source tool for accelerating the conversion process from Mule 3 to Mule 4 application. Due to the complexities in the conversion process, MMA will not be able to convert 100 percent of the applications, and manual intervention is required to attain a fully functional Mule 4 application.</em></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Steps to migrate Mule 3 to Mule 4 Using MMA:</strong></p><p><strong>Step 1: Download MMA::</strong>To download the MMA tool, refer to the link below:<a href="https://github.com/mulesoft/mule-migration-assistant/blob/master/docs/user-docs/migration-tutorial.adoc">https://github.com/mulesoft/mule-migration-assistant/blob/master/docs/user-docs/migration-tutorial.adoc</a></p><p><strong>Step 2: Create a Mule 3 App in Anypoint Studio 6 Version:<br></strong>Below is a sample Mule 3 application which consists of various components :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*qJz8RIfWZoFYT8N_keaOmA.png" /></figure><p><strong>Step 3: Migration using MMA Tool</strong></p><ul><li><strong>project base path</strong>: Mule 3 application path</li><li><strong>destinationProjectBasePath</strong>: Mule 4 application path where you want it to migrate.</li><li><strong>Command for migration: </strong>In a command console you need to run the following command with set projectBasePath and destinationProjectBasePath.</li></ul><p>java -jar mule-migration-assistant-runner-1.0.0.jar -muleVersion 4.3.0 -projectBasePath C:/Users/user/AnypointStudio/workspace/demo-mule3-project -destinationProjectBasePath</p><p>C:/Users/user/AnypointStudio/workspace/migrated4</p><p><strong>Same command is used for both Windows and Mac OS.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*2cGxubWuvO-j7g9NuKY74g.jpeg" /></figure><p>Import your Mule 4 application in <strong>Anypoint Studio 7 Version </strong>and a summary report is generated which is important that it contains errors, warnings, and info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*RuN6Hj7mZD2iYwS_5vLLKA.jpeg" /></figure><p><strong>Error</strong>: Aspects of the Mule 3 apps which have no direct conversion to Mule 4 apps and need to be manually re-written.<br><strong>Warnings</strong>: Aspects of the Mule 3 apps that have a similar translation in Mule. <strong>Info</strong>: Aspects of the Mule 3 apps that have been slightly modified with no major functionality change.</p><p><strong>Step 4: Manual Migration in Mule 4 Application based on Summary Report:<br></strong>Import your migrated application in <strong>Anypoint Studio 7 Version </strong>and below is the application before manual migration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*pamxoHCBrdwIxkySZ0Jiyw.jpeg" /></figure><p>MMA is a great tool to save up a tremendous amount of time and effort and is constantly evolving. The developers can access the source code to modify and improve it to best suit their needs and accelerate the migration efforts.</p><p>References:</p><ul><li><a href="https://blogs.mulesoft.com/news/anypoint-platform/mule-4-migration-assistant/">Mule 4 migration made easy with Mule Migration Assistant | MuleSoft Blog</a></li><li><a href="https://github.com/mulesoft/mule-migration-assistant">GitHub - mulesoft/mule-migration-assistant: Migration Framework</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8452f754cbf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transaction Management in Mule4]]></title>
            <link>https://medium.com/@pinak575/transaction-management-in-mule4-34d6dd8b2b17?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/34d6dd8b2b17</guid>
            <category><![CDATA[transaction-management]]></category>
            <category><![CDATA[mulesoft-esb]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Sun, 01 May 2022 12:53:51 GMT</pubDate>
            <atom:updated>2022-05-05T12:32:09.339Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Transaction in Mule4:<br></strong>A transaction in Mule4 ensures that all operations in a logical sequence of the flow are either completed successfully or each operation is rolled back. A transaction makes sure that all operations act as a single unit.</p><p><strong>Points to Ponder:</strong></p><ul><li><em>Mule commits the transaction if the processing of all event processors which have joined the transaction is completed successfully.</em></li><li><em>If any event processor raises an error then the transaction is rolled back. The transaction rollback ensures that the processing of processors is rolled back.</em></li><li><em>The transaction is generally executed by a single thread in mule Runtime.</em></li></ul><p><strong>Transaction Types:<br></strong>Mule supports Single Resource (Local, the default) and Extended Architecture (XA) transaction types (transaction type).</p><h3>1.Single Resource Transaction:</h3><p>A single resource transaction is one where only a single resource is involved in a transaction i.e. only JMS connectors Database connectors or VM connectors in a transaction.</p><p>A flow can consist of –</p><ul><li>Many Database connectors but they should all point to the same database</li><li>Many JMS connectors but they should point to the same JMS Server</li></ul><p>The connectors in the flow must use the same connection configuration.</p><p><strong><em>1. Performs better than XA transactions.</em></strong></p><p><strong><em>2. Does not support nested transactions.</em></strong></p><h3>2.Global/XA Transactions</h3><p>A Global/XA transaction is one where multiple resources are involved in a single transaction</p><p>For example:</p><ul><li>JMS connector and Database connector in a single transaction.</li><li>JMS connector and VM connector in a single transaction.</li><li>Multiple database connectors which are pointing to different databases.</li></ul><p>The only components that can define the transaction type are message sources (For example, JMS: listener and VM: listener) and the Try scope.</p><ol><li><strong><em>Involves using a two-phase commit protocol (2PC).</em></strong></li><li><strong><em>Slower but more reliable than Single Resource transactions.</em></strong></li><li><strong><em>Supports nested transaction</em></strong></li></ol><p><strong>Transactional Actions:</strong></p><ul><li><strong>Always Begin</strong> — Always start a new transaction when receiving a message. If a Single Resource transaction exists, an error occurs. If an XA transaction exists, a nested transaction is created.</li><li><strong>Begin or Join </strong>— Join a transaction if it exists or else starts a new transaction.</li><li><strong>Always Join</strong> — Always expect a transaction to be in progress.</li><li><strong>Indifferent</strong> — Do not treat it as a transaction.</li><li><strong>None</strong> — Do not start a transaction.</li><li><strong>Not Supported</strong> — Execute outside any existent transaction.</li><li><strong>Join If Possible</strong> — Join if a transaction is available or else do nothing.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>*******Example of Single Resource Transaction:**********</strong></p><p><strong>Transaction {Insert operation into three tables into the single database}:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*U1U4T_7Z0rU0fTc_HNkC1A.png" /></figure><p><strong>Note:</strong><br><strong>TRANSACTION USER: LOCAL</strong></p><p><strong>TRANSACTION OPTION {INSERT OPERATION}: ALWAYS JOIN</strong></p><p><strong>TRANSACTION OPTION {TRY BLOCK}: ALWAYS BEGIN</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FO0JgkVaTdLiiE5-PS3AxA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gxXc_4gvbSeDRWUK-t0rg.jpeg" /></figure><p>In the case of :<br>1. <strong>Happy Scenario:</strong> Transaction gets Executed Successfully and insertion operation is performed in three Tables table1, table 2, and table 3 respectively.</p><p>2. <strong>Unhappy Scenario</strong>: Transaction gets rolled back if insert operation gets failed in case of any DATABASE insert operation.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>*******Example of Global /XA Transaction:**********</strong></p><p>Example Transaction consists of:</p><p><strong>Transaction{Insert operation into database, Upsert operation into Salesforce object, and Publish operation into JMS queue.}</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*f9oxHzXALpHKcT0tLR7Apw.png" /></figure><p><strong>Note:</strong><br><strong>TRANSACTION USER: XA</strong></p><p><strong>TRANSACTION OPTION {INSERT OPERATION}: ALWAYS JOIN</strong></p><p><strong>TRANSACTION OPTION {TRY BLOCK}: ALWAYS BEGIN</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wZOXSBEKmCatW4Ci9Vx7A.jpeg" /></figure><p>In the case of :<br>1. <strong>Happy Scenario:</strong> Transaction gets Executed Successfully and insertion operation into the database, Upsert into salesforce and publish in JMS QUEUE is completed successfully.</p><p>2. <strong>Unhappy Scenario</strong>: Transaction gets rolled back if insert operation gets failed or Upsert Operation gets failed or JMS Queue is down or all of the mentioned.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>Transaction Recovery</h3><ul><li>Mule includes a transaction recovery procedure that is executed automatically, no configuration is needed.</li><li>When Mule restarts after a system crash, it connects to all of the resources involved in XA transactions and starts the transaction recovery process, leaving all systems in a consistent state.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34d6dd8b2b17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mule4 Custom Configuration Properties using Azure Key Vault]]></title>
            <link>https://medium.com/@pinak575/azure-vault-custom-properties-provider-mulesoft-a24244e87a15?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a24244e87a15</guid>
            <category><![CDATA[azure-key-vault]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 17:49:14 GMT</pubDate>
            <atom:updated>2022-04-29T13:06:23.629Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Azure Key vault is a great tool for securely storing and accessing secrets. A secret could be anything that you want to control access to like passwords or API keys.</em></strong></p><p><strong><em>A vault is a logical group of secrets that provides a secure way of accessing them.</em></strong></p><p>The is to use a custom configuration properties provider for Azure Vault. This approach consumes Credentials for Azure Account and retrieves the necessary tokens from Key Vault at the startup of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*jyArWnTRpGgfBTkoH5R6Sg.png" /></figure><h4><strong>— — Steps to Configure Custom Configuration Provider Azure: — —</strong></h4><p>1. Clone the project to your local, change the groupId to point to your org Id.<br>{ <a href="https://github.com/mulesoft-catalyst/azure-vault-custom-properties-provider-encrypted">https://github.com/mulesoft-catalyst/azure-vault-custom-properties-provider-encrypted</a>.}</p><p>2. {<strong>Installation}</strong> For local install, give any groupId. Issue mvn clean install -DskipTests.</p><p>3. <strong>{Deploy}</strong> Issue mvn deploy. Ensure that there is an entry in your settings.xml pertaining to Exchange2.</p><h4>Using the module in a Mule4 Project:</h4><p>4. Create a Sample Application, which consumes Secrets stored in Azure Key Vault.</p><p>Add this dependency to your application pom.xml :</p><pre>&lt;dependency&gt;<br>&lt;groupId&gt;${groupId}&lt;/groupId&gt;<br>&lt;artifactId&gt;azure-vault-custom-properties-provider-encrypted&lt;/artifactId&gt;<br>&lt;version&gt;${version}&lt;/version&gt;<br>&lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>&lt;/dependency&gt; </pre><p>4. After Adding dependency under in Global elements-&gt;Connector configuration-&gt;Azure vault properties provider config will be visible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*k1N4AWEUhqgsSS1IbKn5kA.jpeg" /></figure><p>5. Configure the Connector fields and add the properties file(secure).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*LTCnn5QafxQghk_ltTkeOg.jpeg" /></figure><p>Add the following fields in the configuration element:</p><ol><li><strong>Client ID, 2. Client Secret.3.Azure Vault Name,4.Base64 Encoded encryption key, 5.Local file (secure-properties file),Set Connection status to False.</strong></li></ol><p>{True or False to indicate if you want to byAzure Vault and load from the file within the project. the <em>local file</em> is Mandatory if the flag is encrypted_AzureVaultConnector}</p><p><strong>A Test Flow to demonstrate the retrieval of secrets from the azure key vault.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*N0Dya5U9CVY2ZmgdIv1UsQ.png" /></figure><p>Usage of Prefix in XML View:</p><pre>&lt;set-variable<br>value=&quot;${azure-vault::verification-token}&quot;<br>doc:name=&quot;Set Variable&quot; doc:id=&quot;045a2583dsf-411a-46fd-9352-    60c64887970c&quot; variableName=&quot;azureProperty1&quot;/&gt;</pre><p><strong>Points to Ponder:</strong></p><ol><li>Client ID, Secret from Azure need to be provided in an encrypted fashion (AES, CBC with Random IV with 256 bit encrypted key).</li><li>If you need to use any other method for Encryption/decryption, you can update the decryption class “CustomCodeSecretProperties.java”</li><li>The vault name should be provided against which Mule will fetch keys from Azure Vault Key Store.</li><li>Encrypt key should be a base64 encoded key.</li></ol><p><strong>Using Secure Properties config:</strong></p><ol><li>For all purposes, this module relies on “<strong>azure-vault”</strong> as the prefix.</li></ol><ul><li>Any property provided as ${azure-vault::} will be referenced from Azure Vault Key Store. You can change it at AzureVaultConfigurationPropertiesProvider.</li></ul><p>2. There can be n a number of secrets in Azure Vault key store. The best way to access a particular key ${azure-vault::key}.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>References:</strong></p><p>For Developing a POC Around “<strong>Custom configuration properties provider extension”,</strong> a reference is taken from the Mulesoft catalyst repository provided by mulesoft.</p><ol><li><a href="https://docs.mulesoft.com/mule-runtime/4.4/custom-configuration-properties-provider">https://docs.mulesoft.com/mule-runtime/4.4/custom-configuration-properties-provider</a>.</li><li><a href="https://github.com/mulesoft-catalyst">https://github.com/mulesoft-catalyst</a></li><li>Code:<a href="https://github.com/Pinak-A/AzureCustomConfigMulesoft">https://github.com/Pinak-A/AzureCustomConfigMulesoft</a></li><li>Custom config properties for the azure key vault can be found here:</li></ol><p><a href="https://github.com/mulesoft-catalyst/azure-vault-custom-properties-provider-encrypted">GitHub - mulesoft-catalyst/azure-vault-custom-properties-provider-encrypted: azure-vault-custom-properties-provider-encrypted</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a24244e87a15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anypoint Runtime Fabric on Self Managed Kubernetes]]></title>
            <link>https://medium.com/@pinak575/anypoint-runtime-fabric-on-self-managed-kubernetes-7ab5aa90f296?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ab5aa90f296</guid>
            <category><![CDATA[self-managed-kubernetes]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[anypoint-runtime-fabric]]></category>
            <category><![CDATA[runtime-fabric]]></category>
            <category><![CDATA[ek]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Tue, 19 Apr 2022 18:24:36 GMT</pubDate>
            <atom:updated>2022-05-01T18:02:26.092Z</atom:updated>
            <content:encoded><![CDATA[<p>❖Anypoint Runtime Fabric is a container service that automates the deployment and orchestration of your Mule applications and gateways.</p><p>❖Runtime Fabric runs on customer-managed infrastructure on AWS, Azure, virtual machines (VMs), or bare-metal servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQEj5cD22zBvHS69ksaeJw.png" /></figure><p><strong>Some of the capabilities Anypoint Runtime Fabric provides are the following:</strong></p><p>● Isolation between applications by running a separate Mule runtime per application.</p><p>● The ability to run multiple versions of the Mule runtime on the same set of resources.</p><p>● Scaling applications across multiple replicas.</p><p>● Automated application fail-over capabilities.</p><p>● Application management with Anypoint Runtime Manager.</p><p><strong>Anypoint Runtime Fabric on EKS — Prerequisites:</strong></p><p>These are some of the prerequisites you will require before you begin with the Runtime Fabric Setup:</p><ol><li>Active AWS Subscription.</li><li>Valid Anypoint Platform Account with RTF Entitlement.</li><li>AWS CLI version 2.4.5 or later. Run $ aws — version to find the version.</li><li>eksctl <a href="https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html">https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html</a></li><li>kubectl <a href="https://kubernetes.io/docs/tasks/tools/">https://kubernetes.io/docs/tasks/tools/</a></li><li>rtfctl <a href="https://docs.mulesoft.com/runtime-fabric/1.5/install-rtfct">https://docs.mulesoft.com/runtime-fabric/1.5/install-rtfct</a> Cygwin : Windows SYSTEM.</li><li>Cygwin : Windows SYSTEM</li></ol><p>Step 1: Create the Kubernetes Cluster</p><ol><li>Configure your aws CLI using command: {AWS configure}</li><li>Now use the following eksctl command in your command prompt to create clusters in EKS. Use the command after tailoring it to your name, region, node.</li></ol><p><strong>{ eksctl create cluster \ –name={yourname}-eks \ –version=1.18 \ –region=us-east-2 \ –nodegroup-name=standard-workers \ –node-type=m4.large \ –nodes=2 \ –nodes-min=1 \ –nodes-max=4 }</strong></p><p>3. After Creating the clusters it will reflect in the AWS EKS console.</p><p>4. Now use the following command to check the status of the nodes. If it shows as ready, you are good to go ahead. {kubectl get nodes}.</p><p>Step2:Create a Runtime Fabric:</p><p>To install Runtime Fabric on Self-Managed Kubernetes, first, create a Runtime Fabric using Runtime Manager.</p><p>You will see a runtime fabric option in your runtime manager if your Anypoint Platform has the appropriate entitlement.</p><ol><li>Check the Runtime fabric entitlement: Login to Anypoint Org and visit the following URL search for “runtime Fabric”. It is true that if you found this entry, then your org does have RTF entitlement.</li><li>Make sure you have * Manage Runtime Fabrics* permissions in your org.</li><li>Go to the Runtime manager in Anypoint Platform and click on runtime Fabric.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HPnEYdShFBlK3gxj9PbT9Q.jpeg" /></figure><p>4. Click the Create Runtime Fabric Button.</p><p>5. Enter the Name of the Runtime Fabric and select Elastic Kubernetes service from the options and click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*KwZ3-wFZPvi04EZkZe0tFQ.jpeg" /></figure><p>Read and understand the support responsibility declaration, and then click on Accept.</p><p>Make a note of the activation code; you will need this later. Your RTF Status should be *Ready for Activation*. Copy the activation code; we will use this later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEEE17C8WIf1Z_DcSxb6sg.jpeg" /></figure><p>Step 4: Validate the Runtime Fabric:</p><ol><li>Download the rtfctl utility. For windows, you can use the following command from the command prompt: {curl -L <a href="https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl-windows/latest">https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl-windows/latest</a> -o rtfctl.exe}</li><li>Validate Runtime Fabric into your Kubernetes service with the following command in the windows command prompt. {rtfctl validate &gt;}</li><li>If your Kubernetes configuration is not located in the “/.kube/config” directory, set the KUBECONFIG environment variable before running rtfctl.</li><li>The validate option rtfctl verifies the following:</li></ol><p>a. The Kubernetes environment is running.</p><p>b. All required components exist.</p><p>c. All required services are available.</p><p>Step 5: Install the Runtime Fabric into the AKS Cluster:</p><p>Once validation is successful, Install Runtime Fabric with the following command on the Command Prompt: { rtfctl install }</p><p>Where is the activation data obtained after creating the Runtime Fabric using Runtime Manager During installation, the rtfctl utility displays any errors encountered.</p><p>Next, go to the associated environments and select and apply the environment.</p><p>Step 6: Insert Mule License Key:</p><p>If you are working on a Windows machine, you will require a Linux bash shell terminal for the base64 encoding of the license key.</p><ol><li>Go to your Linux bash shell terminal and Run the following command to Base64 encode the license key: { base64 -w0 license.lic} Or* {In the case of windows we can use Cygwin. Use the below command to encode the license key.}</li><li>Make sure you have licence.lic available in the current directory or in the Cygwin installation folder. Ex : {C:\cygwin64\home\USENAME} {base64 -w0 license.lic}</li><li>Go to command prompt and apply the mule license key with the following command: {rtfctl apply mule-license BASE64_ENCODED_LICENSE}</li><li>Check the runtime fabric you create on your Anypoint platform, it should be in an active state. To Verify mule license key applied correctly, run the following command: {rtfctl get mule-license}.</li></ol><p>In case you have a domain , you can apply the ingress template using the following command:</p><p>Below is the Command:</p><p><strong>{ Kubectl apply -f /path/to/ingress-template.yaml Sample ingress-template.yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/service-upstream: “true” nginx.ingress.kubernetes.io/configuration-snippet: | rewrite ^/app-name(/|$)(.*) /$2 break; name: rtf-ingress-template namespace: rtf spec: ingressClassName: rtf-nginx rules: — host: rtf.example.com http: paths: — path: /app-name pathType: ImplementationSpecific backend: service: name: service port: number: 80 }</strong></p><p>Step 8: Validate the Runtime Fabric and Deploy the Application:</p><p>After completing the installation, your Runtime Fabric should be activated within your Anypoint organization. To validate your installation, go to Anypoint Runtime Manager and confirm that the status of the Runtime Fabric is Active. Before deploying an application to your Runtime Fabric, do the following:</p><p>1. Associate RTF with at least one Anypoint environment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*NhqB7ahD0edVlIB83SZY9w.jpeg" /></figure><p>Deploy the Application:</p><ol><li>Deploy the Application:</li></ol><p>■ Navigate to Runtime Manager -&gt; Applications and Click on Deploy Application</p><p>■ Provide the name of the application. Note that the name of the application must be lowercase. (in Cloudhub, we can use Capital case in application name)</p><p>■ Select Deployment target as Runtime Fabric name you just created.</p><p>■ Upload the application’s JAR file.</p><p>■ Select the desired runtime version.</p><p>■ Select the number of replicas</p><p>■ Option *Run in Runtime Cluster-Mode* will be enabled only when you have more than one node and more than one in your AKS cluster and more than 1 replica selected.</p><p>■ Option *Enforce deploying replicas across node* can be selected if your AKS cluster nodes are greater than or equal to your replicas.</p><p>■ Use Persistent Storage: The Persistent gateway needs to be configured with RTF to use this option.</p><p>■ Select Deployment Model as Rolling Update. This ensures availability by incrementally updating replicas. Requires one additional replica is worth of resources to succeed.</p><p>■ Select Reserved CPU, CPU Limit, and Memory as per your sizing requirements.</p><p>■ Click on the Deploy Application Button</p><p><strong>Step By Step Guide to Setup RTF on Self managed Kubernetes:</strong></p><p><strong>Author:</strong> Pinak Acharya|Apisero Inc.</p><p><a href="https://drive.google.com/file/d/15ouPwQ6oNxqRpcVCnz-9DmEqXSiHYDaI/view?usp=sharing">https://drive.google.com/file/d/15ouPwQ6oNxqRpcVCnz-9DmEqXSiHYDaI/view?usp=sharing</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ab5aa90f296" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Custom Policies in Mule4]]></title>
            <link>https://medium.com/@pinak575/create-custom-policies-in-mule4-6b0abfa18a4?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b0abfa18a4</guid>
            <category><![CDATA[mulesoft-custom-policies]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[custom-policies]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Mon, 18 Apr 2022 10:17:23 GMT</pubDate>
            <atom:updated>2022-05-01T18:11:12.836Z</atom:updated>
            <content:encoded><![CDATA[<p>Custom Policies are policies that anyone can develop and apply to their APIs, to extend existing functionality or define new ones.</p><p>We use Maven to build and deploy Mule 4 policies. Policies consist of two files:</p><ol><li>A deployable JAR file that contains the policy implementation.</li><li>A YAML Configuration File, where the policy parameters and metadata are defined.</li></ol><p>To package a policy in Maven, the development project must be composed of the following files</p><ul><li>An XML template: It contains the implementation of the policy using Mule’s XML schema language.</li><li>A YAML file: It defines the configurable parameters of the policy. Anypoint API Manager uses this file to render the UI to display inputs for the policy.</li><li>The template’s pom.xml file</li><li>It defines policy dependencies. The packaging type needs to be mule-policy. The pom.xml the file may define any other Maven plugin that helps to manage the development lifecycle of the Maven project.</li><li>Resources</li><li>Optional files that the policy depends on, such as certificates and configuration properties files.</li><li>The mule-artifact.json descriptor</li></ul><p><strong>The current workflow to get a working policy for Mule 4 that can be applied in the Anypoint Platform consists of:</strong></p><ol><li>Evaluate your use case based on the use-Case provided.</li><li><a href="https://docs.mulesoft.com/api-manager/2.x/custom-response-policy-example#set-up-the-project">Set up your project</a>.</li><li><a href="https://docs.mulesoft.com/api-manager/2.x/custom-response-policy-example#create_the_YAML">Create the YAML configuration file</a>.</li><li><a href="https://docs.mulesoft.com/api-manager/2.x/custom-response-policy-example#implment_the_policy">Implement custom your policy</a>.</li><li><a href="https://docs.mulesoft.com/api-manager/2.x/custom-response-policy-example#upload_to_exchange">Upload your custom policy to Exchange</a>.</li><li><a href="https://docs.mulesoft.com/api-manager/2.x/custom-response-policy-example#apply_custom_policy">Apply your custom policy</a>.</li></ol><h3>Setup the Project:</h3><ol><li>Create a new directory where the custom policy project will live.</li><li>Go to that directory in the command line.</li><li>Execute the following command:</li></ol><p><em>mvn -Parchetype-repository archetype:generate \</em></p><p><em>-DarchetypeGroupId=org.mule.tools \</em></p><p><em>-DarchetypeArtifactId=api-gateway-custom-policy-archetype \</em></p><p><em>-DarchetypeVersion=1.1.0 \</em></p><p><em>-DgroupId=${orgId} \</em></p><p><em>-DartifactId=${policyName} \</em></p><p><em>-Dversion=1.0.0-SNAPSHOT \</em></p><p><em>-Dpackage=mule-policy</em></p><p><strong>After running the command, the project’s directory will have a structure similar to:</strong></p><p>my-custom-policy/</p><p>├── my-custom-policy.YAML</p><p>├── mule-artifact.json</p><p>├── pom.xml</p><p>└── src</p><p>└── main</p><p>└── mule</p><p>└── template.xml</p><h3>This will create a Hello World Custom Policy in that folder.</h3><ol><li>Import the code in the Anypoint Studio workspace.</li><li>Click on template.xml file -&gt; configuration XML.</li><li>Change this XML to implement our use case.</li></ol><p><strong><em>Note: We will not be able to use the Message Flow section for drag and drop. For Custom policies, We will have to edit configuration XML manually.</em></strong></p><h3>Creating the YAML Configuration File:</h3><ol><li>Specify the conditions used to evaluate the request and response.</li><li>If conditions are parametric, then DataWeave expressions are created.</li></ol><h3>Implementing the Policy</h3><p>You can start implementing their policy as follows:</p><ol><li>Add dependencies in the pom.xml file.</li><li>Add conditions in the template.xml file.</li></ol><h3>Uploading to Exchange</h3><p>To upload a custom policy to Exchange, you must verify that there pom.xml the file is correctly configured for their organization.</p><h3>Task Prerequisites</h3><p>Before Telstra uploads their policy to Exchange, they verify that:</p><ul><li>A new server is created in their Maven settings.xml file.</li><li>A unique ID is assigned, and the username and password of the Exchange credentials exist.</li><li>The URL matches their region.</li><li><strong>Warning:</strong> When you perform similar actions to create your own custom policy, note that the template uses the URL that corresponds to the US region. If your account does not belong to this region, change this value.</li><li>The repository ID matches the one from the Maven settings.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*o5h7KYxO_fXZ5nXtQi9yWg.jpeg" /><figcaption>T</figcaption></figure><p>The policy pom.xml file and locates the distributionManagement section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*sadR74hXWFMa8eSt8uUlIQ.jpeg" /></figure><p>Upload policy to exchange: use the command “mvn deploy”</p><p>The custom policy is uploaded to exchange.</p><p>The policy Appears in any point Exchange once uploaded.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b0abfa18a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mule4- Custom Configuration Properties Provider AWS-SECRETS MANAGER]]></title>
            <link>https://medium.com/@pinak575/mule4-custom-configuration-properties-provider-aws-secrets-manager-b2f6301112ac?source=rss-4ea723fffeb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2f6301112ac</guid>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[aws-secrets-manager]]></category>
            <category><![CDATA[custom-configuration]]></category>
            <dc:creator><![CDATA[Pinak Acharya]]></dc:creator>
            <pubDate>Fri, 15 Apr 2022 08:00:05 GMT</pubDate>
            <atom:updated>2022-04-24T08:52:31.217Z</atom:updated>
            <content:encoded><![CDATA[<p>The Mule custom properties extension allows Mule applications to retrieve sensitive configuration properties such as Keystore passwords, database passwords, etc. directly from the AWS secrets manager.</p><p>You can use the Mule SDK and Mule API to create a custom configuration properties provider that enables an app to discover configuration properties values.</p><p>The benefit of using this approach is that you don’t have to put sensitive property values in clear text in the configuration file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/0*1M2d_aLQ1jLItgg4" /></figure><p>It is possible to create your own custom configuration properties provider by providing your own implementation of the ConfigurationPropertiesProviderFactory interface.</p><p>To provide your own implementation of the configuration property provider you need to extend DefaultConfigurationPropertiesProvider class and then override the methods of that class according to your own requirements.</p><p>Similar to this you can create your own custom configuration provider just go through mulesoft’s documentation and use this project or the one provided by mulesoft for your reference.</p><p><strong>How It Works :</strong></p><p>The Following Custom configuration properties provider Retrieves Secrets from AWS-Secrets Manager for the following Key provided.</p><p>The secrets are loaded at the startup of the mule Application and can be consumed in the Application configuration</p><h3>Steps to implement:</h3><p>1) Go to <a href="https://github.com/mulesoft/mule-custom-properties-providers-module-example">https://github.com/mulesoft/mule-custom-properties-providers-module-example</a> and download the project in preferred IDE.</p><p>2)Open the pom.xml file:</p><p>3)Define the GAV (groupId, artifactId, and version) of your module.</p><ol><li>Define the name of your module.</li><li>Change the package name (com.my.company.custom.provider.api) of your code.</li><li>Open resources/META-INF/mule-artifact/mule-artifact.json:</li><li>Set the type field with value com.my.company.custom.provider.api.CustomConfigurationPropertiesExtensionLoadingDelegate, replacing com.my.company.custom.provider.api to match the package name you changed previously.</li><li>Set the name field using the name you want to define for the module.</li><li>Set the exportedPackages field to match the package name you changed previously.</li><li>Open resources/META-INF/services/org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProviderFactory, and change the content to match the package name you changed previously.</li><li>Open the CustomConfigurationPropertiesExtensionLoadingDelegate class:</li><li>Change the EXTENSION_NAME constant to the name of your module.</li><li>Change the fromVendor method parameter to your company name.</li><li>Customize the section at the end to define the parameters that can be configured in the config element of your module.</li><li>Open the CustomConfigurationPropertiesProviderFactory class:</li><li>Change the CUSTOM_PROPERTIES_PREFIX value to a meaningful prefix for the configuration properties that your module must resolve.</li></ol><p>{Custom Extension used here is <strong>aws-sm-getSecretValue}</strong></p><p>14.Change the class implementation to look up the properties from your custom source.</p><p>15.Update CustomPropertiesProviderOperationsTestCase with more test cases to cover your new module functionality.</p><p>16. run “mvn clean install-DskipTests “(make sure to have maven installed).</p><h3>Using the Custom Properties Provider in a Mule Application</h3><p>1)Create A sample mule4 Application.</p><p>2)Open the pom file of the application(sample Application) where you want to use this component and add the following dependency.</p><p>&lt;dependency&gt;</p><p>&lt;groupId&gt;com.custom.properties.mule.provider&lt;/groupId&gt;</p><p>&lt;artifactId&gt;mule-custom-properties-providers-module&lt;/artifactId&gt;</p><p>&lt;version&gt;1.0.91-SNAPSHOT&lt;/version&gt;</p><p>&lt;classifier&gt;mule-plugin&lt;/classifier&gt;</p><p>&lt;/dependency&gt;</p><p>3)Now, open the application XML file and in the Global Elements tab and click Create. “Aws-sm-properties-config” will Appear below Connector Configuration Section: Under Connector Configuration, you should see an option for selecting the configuration from your custom module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/0*JfA9hwO9jJelNQJt" /></figure><p>4). Configure your new component (Aws-sm-properties-config) and start using properties with the prefix defined in your module.</p><p>Add Property placeholder for AWS Account which will be taken from properties file of the project.</p><p><strong>Note:Add Accesskey,SecretKey,Region</strong></p><p><strong>Note:-Accessing Credentials from secrets manager into mule application using custom configuration: Below example illustrates the usage.</strong></p><p>The key password:<strong> “${aws-sm-getSecretValue::Secret_Name:Secret_key}</strong></p><p>Where</p><p>1. “<strong>aws-sm-getSecretValue</strong>” is the Prefix used for custom configuration.</p><p>2. “<strong>Secret_Name</strong>” is the name of a secret to be retrieved from the Secrets manager.</p><p>3. “<strong>Secret_Key</strong>” is the key to the secret to being retrieved.</p><p>Example: Accessing Secrets stored in AWS Secrets Manager for Salesforce Connector Config:</p><p>Here Salesforce <strong>Password</strong> and <strong>Security Token</strong> are being retrieved from AWS Secrets Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/0*ZQMk3_SkqXJwV5nP" /></figure><p>The downside is of course this solution requires access to the AWS secrets manager.</p><p>Direct Link Reference to Code:AWS Secrets Manager- Mule4 Custom Config Properties Provider:</p><p><a href="https://github.com/Pinak-A/MulesoftCustomPropertiesProvider-AWS-M">https://github.com/Pinak-A/MulesoftCustomPropertiesProvider-AWS-M</a></p><p>References:</p><p><a href="https://docs.mulesoft.com/mule-runtime/4.4/custom-configuration-properties-provider">https://docs.mulesoft.com/mule-runtime/4.4/custom-configuration-properties-provider</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2f6301112ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>