Posts

Showing posts from January, 2025

Central and HTTP Thread Pool, Thread Switching Scenario usecases in Mule4

 Refer Mulesoft blog link provided below  on how threading works in mule4, refer the scenarios presented for detailed understanding of different thread pools, switching and behavior. Broad Topics Covered: Centralized thread pools HTTP thread pools Thread pool responsibilities Thread pool sizing Thread pool scheduler assignment criteria Mule runtime example consumption of thread pools Typical thread switching scenario - usecases https://blogs.mulesoft.com/dev-guides/how-to-tutorials/thread-management-auto-tuning-mule-4/

DB Update Statement with In Clause in Mulesoft

Image
 Here we will look at how Update SQL query with IN clause can be constructed when there are multiple values coming as array as IN clause input Assuming that dateSent must be updated for all the eventIds sent as input using IN clause. Input: { "dateUpdated" : "2025-01-14" , "eventId" : [ "234er-4356" , "234er-4896" , "4dse4-4321" ] } Building Update SQL in Dataweave %dw 2.0 output application/json --- { "dynamicUpdateStatement" : "Update table_name set dateSent='" ++ payload . dateUpdated ++ "' where eventId in (" ++ "'" ++ (payload . eventId joinBy( "','" ) ++ ")" ) } Output: { "dynamicUpdateStatement" : "Update table_name set dateSent='2025-01-14' where eventId in ('234er-4356','234er-4896','4dse4=4321')" } Screenshot: Another Solution: Dataweave: %dw 2.0 output application/json ---...

Difference between SOAP API calls, Batch operations, and Bulk API v2 from MuleSoft Perspective

Salesforce SOAP API calls, Batch operations, and Bulk API v2 have specific purposes and use cases, especially when integrated with MuleSoft’s Salesforce Connector. Below is a comparison from the perspective of MuleSoft’s connector integration: Feature Salesforce Batch(SOAP call) Salesforce Bulk V2 Processing/API Type synchronous - Each call is processed immediately and waits for the result (suitable for real-time integrations). asynchronous - Operates asynchronously, meaning the request is submitted and Salesforce processes it in the background. The client does not wait for the completion of the operation. Record Limit Per call 200 Maximum number of records in a batch N/A (from v2 onwards), Maximum file size 150MB per Job, Maximum number of fields in a record 5,000, Maximum number of characters for all the data in a batch 10,000,000 Data Volume Best for smaller volumes of data (few records). Desi...