<?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 Sadiktech on Medium]]></title>
        <description><![CDATA[Stories by Sadiktech on Medium]]></description>
        <link>https://medium.com/@sadiktech?source=rss-5ab518a018e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SrXyIwERxZrWS0gz</url>
            <title>Stories by Sadiktech on Medium</title>
            <link>https://medium.com/@sadiktech?source=rss-5ab518a018e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:51:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sadiktech/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[Upload Data using MuleSoft 4 Connector]]></title>
            <link>https://medium.com/@sadiktech/upload-data-using-mulesoft-4-connector-9be5f0ded1eb?source=rss-5ab518a018e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9be5f0ded1eb</guid>
            <category><![CDATA[anypoint-platform]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[esb]]></category>
            <category><![CDATA[mulesoft-professional]]></category>
            <dc:creator><![CDATA[Sadiktech]]></dc:creator>
            <pubDate>Tue, 09 May 2023 23:28:22 GMT</pubDate>
            <atom:updated>2023-05-09T23:28:22.482Z</atom:updated>
            <content:encoded><![CDATA[<p>MuleSoft 4 Bulk API Connector</p><p><strong>Substantial data publishing to Salesforce encounters problems</strong></p><p>Bulk data publishing to Salesforce can also show several challenges. Here are some issues we may encounter while bulk data publishing to Salesforce:</p><ol><li>API Limits: Salesforce imposes limits on the number of API requests per day, per user, and per organization. Bulk data publishing can involve a large number of API requests, which can efficiently exceed the API limits. To avoid crashing API limits, we can use Bulk API or Bulk API 2.0, which are prepared for bulk data processing and can handle large volumes of data more efficiently.</li><li>Network Connectivity: Bulk data publishing mandates a stable and fast network connection. If our network connection is slow or unstable, it can cause issues such as timeouts, dropped connections, and slow data transfer. To optimize network connectivity, we can use a reliable and fast network connection, optimize network settings, or use a content delivery network (CDN).</li><li>Data Consistency: Bulk data publishing requires consistent and accurate data to ensure data integrity. If the data are publishing is not consistent or accurate, it can cause issues such as invalid data types, or data corruption.</li><li>Data Transformation: Bulk data publishing may require data transformation to meet Salesforce data requirements, such as converting data types, merging fields, or creating new fields. If the transformation process is not properly designed or executed, it can cause issues such as data loss, data inconsistency, or data corruption. To ensure data transformation accuracy, it can test specified data transformation process in a sandbox environment before going live.</li><li>Data Volume: Bulk data publishing can involve large volumes of data, which can cause issues such as long processing times, slow data transfer, and system overloading. To optimize data volume, it can split data into smaller batches, use Bulk API or Bulk API 2.0 for faster data processing, or leverage data compression tools such as gzip.</li></ol><p>To avoid these issues while bulk data publishing to Salesforce, it is recommended to follow best practices such as testing bulk data publishing process in a sandbox environment, optimizing network connectivity, ensuring data consistency and accuracy, and splitting data into smaller batches.</p><p>Users can perform bulk operations on Salesforce data utilising a set of connections that are provided by the Bulk Operation module in Mule 4. These connections make advantage of the Salesforce Bulk API, which is more efficient than the REST API to process massive amounts of data in Salesforce.<br>Connectors are provided by the Bulk Operation module for performing standard bulk operations like:<br>Upsert: Update existing records or insert new ones based on matching criteria.</p><ol><li><strong>Delete</strong>: Delete records from Salesforce.</li><li><strong>Query</strong>: Retrieve data from Salesforce based on a specified SOQL query.</li><li><strong>Job Status</strong>: Retrieve the status of a bulk job in Salesforce.</li><li><strong>Get Job Results</strong>: Retrieve the results of a completed bulk job.</li><li><strong>Get Batch Results</strong>: Retrieve the results of a specific batch in a bulk job.</li></ol><p><strong>MuleSoft Salesforce Bulk API observations</strong></p><p>MuleSoft’s Salesforce Bulk 2.0 Connector is a powerful tool for integrating Salesforce with other applications. However, there are some limitations to keep in mind when using this connector:</p><ol><li>Maximum batch size: The Salesforce Bulk 2.0 Connector can process batches of up to 10,000 records for most objects, or up to 1,000 records for certain objects such as accounts and contacts.</li><li>Maximum payload size: The maximum payload size for a single batch is 150 MB. If data exceeds this limit, it will need to split it into multiple batches.</li><li>Maximum number of batches: The Salesforce Bulk 2.0 Connector allows it to submit up to 100 batches in a single job.</li><li>Query length limitation: If we are using the Salesforce Bulk 2.0 Connector for querying, the length of query cannot exceed 20,000 characters. If our query is longer than this, need to split it into multiple queries.</li><li>API request limits: Like all Salesforce APIs, the Salesforce Bulk 2.0 Connector is subject to Salesforce’s API request limits. The exact limits depend on Salesforce edition and licensing, but in general, it should aim to stay within 1,200 API requests per minute.</li><li>Limited support for composite requests: The Salesforce Bulk 2.0 Connector does not support composite requests, which allow to perform multiple operations in a single API call.</li><li>Limited support for custom objects: The Salesforce Bulk 2.0 Connector may not support all custom objects in Salesforce organization, depending on their configuration.</li></ol><p>It’s crucial to keep these recommendations in consideration while designing integration with MuleSoft’s Salesforce Bulk 2.0 Connector, as exceeding these limits can lead to job failures and API errors.</p><p><strong>MuleSoft 4 Salesforce Bulk API v2 Connector Configuration</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dETxO-UnYVbjtPmwehOpxA.png" /></figure><p><strong>Operations can be configured</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p4-A5USJ12IVCwv0ucAYQA.png" /></figure><p><strong>Line Ending Configuration</strong></p><p>In the Salesforce Mule 4 Bulk v2 connector, the line ending configuration determines the line ending character used in CSV files when serving bulk functions with the connector. By default, the connector uses the system’s default line-ending character, but this can be configured to use a precise line-ending character if necessary.</p><p>To configure the line ending character in the Salesforce Mule 4 Bulk v2 connector, we can use the line-ending attribute in the connector’s configuration element. This attribute accepts a string value representing the line-ending character to use. For example, to use the Windows-style CRLF line ending character. In this case, the line-ending attribute is set to the string value “rn,” which is a CRLF line-ending character in the Windows style.</p><p>Mention that any legitimate string value representing a line ending character, such as the older Mac-style CR character (“r”) or the Unix-style LF character (“n”), can be used as the line-ending attribute value.<br>The connector will utilize the system default line ending character if we don’t specify the line Ending attribute in existing setup. For the majority of use situations, this might be acceptable, but if we are creating CSV files on a platform (like Windows) that has a different default line ending character than Salesforce, it might need to specifically specify the line ending character to prevent problems with bulk uploads.</p><p><strong>Common Delimiter</strong></p><p>To configure the Common Delimiter in the Salesforce Mule 4 Bulk v2 connector, it can configure the common delimiter attribute in the connector’s configuration element. This attribute accepts a string value representing the delimiter character to use. For example, use a pipe (“|”) as the delimiter character.</p><p>It depicts a pipe as the delimiter character. Note that the common delimiter attribute can be set to any correct string value illustrating a delimiter character.<br>If we don’t specify the common delimiter attribute in configuration, the connector will use a comma (“,”) as the delimiter character by default. This may be fine for most use cases, as comma-separated values (CSV) is a widely used format for data interchange. However, if CSV files use a different delimiter character (such as a tab or semicolon), need to configure the Common Delimiter accordingly to avoid issues with bulk uploads.</p><p><strong>Assignment Rules ID</strong></p><p>The Assignment Rules ID is a parameter that specifies the ID of the assignment rule that should be applied to a new lead or case when it is created in Salesforce.<br>Assignment rules in Salesforce are used to automatically assign leads or cases to the relevant users or queues based on predefined criteria. When a new lead or case is created in Salesforce, the system checks the assignment rules to determine which user or queue should manage it. By establishing the Assignment Rules ID in the MuleSoft Salesforce connector, it can ensure that any new leads or cases created by our integration will be assigned according to the identical rules as if they were created directly in Salesforce.<br>To use the Assignment Rules ID parameter in the MuleSoft Salesforce connector, it must first obtain the ID of the appointment rule whch we desire to apply. This can be done by navigating to the appropriate assignment rule in Salesforce and looking at the URL, which will contain the ID as a string of characters. Once we have the ID, it can pass it to the connector as a configuration parameter.</p><p><strong>External id Field Name</strong></p><p>The external Id Field Name attribute is set to the string value, which represents the external ID field name to use for upsert/update operations. Note that the external Id Field Name attribute is only used for update/upsert operations, and is not required for other types of bulk operations.<br>When performing upsert/update operations, the connector will use the specified external ID field to match records in Salesforce. It will perform operation based on its nature.</p><p><strong>Some useful Operations</strong></p><p><strong>Close Bulk Operation connector : </strong>In the MuleSoft 4 Salesforce connector, the Close Bulk Operation connector is used to close a bulk operation job that was previously started with the Start Bulk Operation connector. When we execute bulk operations using the Salesforce connector, typically it starts by initiating a job with the Start Bulk Operation connector, adding data to the job utilizing the appropriate data processing connector (e.g., Upsert or Delete), and then closing the job with the Close Bulk Operation connector. The Close Bulk Operation connector is used to signal to Salesforce that have completed adding data to the job and that Salesforce can initiate processing the job.</p><p>Here are some explanations why the Bulk Connector V2 is vital in MuleSoft 4:</p><ol><li>Efficiency: The Bulk Connector V2 is designed to handle large volumes of data more efficiently than the standard REST API in Salesforce. With bulk operations, we can process data in batches, which can significantly reduce the time it takes to achieve data operations.</li><li>Reduced API calls: Using bulk functions can help alleviate the number of API calls made to Salesforce, which can help reduce the load on the Salesforce platform and improve overall performance.</li><li>Simplified development: The Bulk Connector V2 simplifies the development process by providing a set of connectors that handle the details of creating, managing, and monitoring bulk jobs in Salesforce. This authorizes developers to concentrate on the business logic of their integrations rather than the underlying mechanics of managing bulk jobs.</li><li>Flexibility: The Bulk Connector V2 provides a flexible framework for working with different types of data in Salesforce, including custom objects, standard objects, and external objects. This flexibility allows us to design integrations that can handle a wide range of data scenarios.</li><li>Error handling: The Bulk Connector V2 provides robust error handling capabilities, allowing us to catch and handle errors in real-time as they occur during the bulk operation. This can help reduce the impact of errors on our integration and provide better visibility into any issues that may arise.</li></ol><p>Overall, the Bulk Connector V2 is an crucial component for any integration that applies working with enormous amounts of data in Salesforce. It provides a adaptable, efficient, and easy-to-use framework for achieving bulk operations, which can support lessen development time, streamline maintenance, and enhance overall performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9be5f0ded1eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guaranteed Delivery using Circuit Breaker in Mule 4]]></title>
            <link>https://medium.com/@sadiktech/guaranteed-delivery-using-circuit-breaker-in-mule-4-552bc0b2f5e6?source=rss-5ab518a018e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/552bc0b2f5e6</guid>
            <category><![CDATA[circuit-breaker]]></category>
            <category><![CDATA[data-guard-365]]></category>
            <category><![CDATA[anypoint-platform]]></category>
            <category><![CDATA[anypoint-studio]]></category>
            <category><![CDATA[data-delivery]]></category>
            <dc:creator><![CDATA[Sadiktech]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 02:41:18 GMT</pubDate>
            <atom:updated>2023-04-01T02:41:18.522Z</atom:updated>
            <content:encoded><![CDATA[<p>There is thump rule to implement guaranteed delivery that is “Make messages durable with Guaranteed Delivery to ensure that they are not lost even if the processing system fails.”</p><p><strong>Circuit Breaker Approach</strong></p><p>Applications utilize the well-known strategy comprehended as a circuit breaker to prevent a failure in one area of the system from extending to the remainder of the system. Several services process data from one system to another system in distributed architectures. The consuming service may wait until a timeout occurs if the destination service is unreachable or the network is inefficient. Critical resources, including server threads and memory, are still being used by the caller service during this period.</p><p><strong>Scope</strong></p><ol><li>The scope of a circuit breaker with an Anypoint message queue would predominantly be to supply imperfection tolerance and resilience to the messaging system by controlling cascading failures when a downstream service is unavailable or encountering high latency.</li><li>As widespread, a circuit breaker is a design pattern that is used to prevent an application or service from constantly retrying a failed process that is improbable to succeed, thus avoiding resource exhaustion and additional degradation of the system.</li></ol><p><strong>Circuit Breaker flow</strong></p><p>It known as a protected process known. It observes failures. Once the issues goes to a particular entry, the circuit breaker trips and halt other execution.</p><p><strong>Practice to use Circuit Breaker</strong></p><ol><li>Configure Circuit Breaker to MuleSoft flow that consumes messages from the Anypoint message queue.</li><li>Configure the Circuit Breaker policy with the proper values, such as the number of acceptable failures to trip the circuit and the timeout duration for the circuit to reset.</li><li>If the message processing fails, the Circuit Breaker will trip the circuit, controlling further messages from being processed until the circuit has reset.</li><li>During this period, the Circuit Breaker policy takes some other action. For instance, that is returning a default value or sending an error message to a established queue.</li><li>Once the circuit has reset, the Circuit Breaker policy will allow messages to be processed again.</li></ol><p>By using Circuit Breaker with Anypoint Message Queues, you can ensure that your application is not overloaded with messages during a surge or failure in the queue and that your message processing logic is resilient to occasional failures. The critical point of it to prevent data loss in case of error/exception while process incoming messages.</p><ol><li>Scenario Data insert operation in Salesforce using Anypoint Message Queue as data source for the application flow.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oxmrt1Zfg2oHjWdIFSv4dw.png" /></figure><p>That’s it.</p><p>We have configured OAuth 2.0 connection for Salesforce in applicaiton.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0OLUHZ209cku3w808Hcyg.png" /></figure><p>When it comes to Anypoint message queue, the circuit breaker pattern can be applied to preclude a message customer from endeavoring to consume messages from a queue that is unavailable or unresponsive. In this case, the circuit breaker can be configured to trip after a certain number of consecutive failures, and switch to an alternative behavior, such as returning an error message, invoking a fallback service, or simply delaying the retries.</p><p>2. Now, lets reproduce scenario</p><p>Configure queue in Control plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*GatuTnULpGWTH3HOUW26-Q.png" /></figure><p>Start application in studio : —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBaIP3YtC5A68drgyGlEsw.png" /></figure><p><strong>Error Scenario :</strong> As we have configured OAuth 2.0, after staring application , we will not perform OAuth-Dance to authorize our server. Therefore, it will throw error while preforming operation using Salesforce connector .[SALESFORCE:CONNECTIVITY]</p><p>Send message to queue using Anypoint control plan feature .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*LRYn_gkwPWFNkewgVzbapg.png" /></figure><p>As OAuth-Dance was not executed hence we see below error. As highlighted error is one of error type which is configured in Circuit breaker as above hence circuit is open now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*unvbAG9OaS0N3YqmTytgWQ.png" /></figure><p>Circuit breaker configuration in application is as below..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lXmxVEUNvDLFUGNL0jSk2g.png" /></figure><p>Once error occurred, circuit breaker will trigger and mark current message with -ve acknowledgment along with blocking rest of message processing.</p><p>All the message will stay in stage to be processed until circuit breaker mark issue resolved and allow all message to consumed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*Tix9y2CATk0TfeAX0WXEMg.png" /></figure><p>The amazing approach provided by MuleSoft to use guarantee data delivery.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=552bc0b2f5e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>