What’s new in Mule Runtime 4.5.0.
Mule has released its latest runtime version 4.5.0 on October 3rd 2023, In this article I shall be covering details on what’s new in the runtime, and other modifications and optimizations.
With release 4.5.0 Mule has switched its release cycle management practices to match Salesforce release cycles.
Predictable Release Cadence
- New releases will occur three times a year
- (Winter, Spring, Summer). This aligns with the Salesforce release cycle
- Benefit : to plan and manage upgrades more efficiently across SF and Mule platforms.
- LTS Releases :
- LTS releases include prior Edge release features, new features, and are rolled out once a year with 12 months of standard and 12 months of extended support.
- Tailored Release Channels
- Choose between two release channels:
- Edge and LTS.
- Edge releases offer the latest features and are released three times a year
- Comes with 4 months of standard and 4 months of extended support.
- On the Cloudhub Deploy application menu you will notice new section to select either to use the Edge release channel or not
- Memory management Improvements:
- Efficient memory management played a vital role in the success of MuleSoft all these days, efficient memory management helped developers to build highly performing applications to run in just a small fraction of vCore very efficiently.
- In the New runtime 4.5.0, MuleSoft has improvised runtime managers memory management capabilities by introducing a centralized memory service
- The primary goal of this centralized memory service is to control the memory allocation for different components such as HTTP and Dataweave. I shall publish more details in coming articles.
API Gateway improvements:
The Mule API Gateway is a Java Agent extension that identifies the communication protocols, proxies, policies that we configure for a proxy. It acts as a common component, to helps businesses manage and route the incoming API requests, aggregate outgoing API responses, and enforce service level agreements. It also acts as a secure access point that protects the APIs of an organization.
API gateways are mostly used to control access to APIs to protect them, reduce API abuse, and increase their value. Additionally, an API gateway add an insulation layer between providers and consumers of APIs. At a high level, an API gateway: Authorizes and authenticates: Ensures secure access to APIs and who (authorize) can call APIs.
Mule Runtime includes an embedded API Gateway. Using this gateway, we can,
apply a basic authentication policy on top of a Mule application, enrich an incoming/outgoing message, or add any other complex capability to an API without having to write any code
With runtime 4.5.0, MuleSoft has brought enhancements on policy ordering and editing to optimize the synchronization between API Manager and the API Gateway.
Feature Flagging Mechanism:
- Mule 4.5 incorporates new feature flags, which enables you to disable certain features that change core functionality in Mule to avoid backward compatibility issues.
DataWeave Features
Dataweave 2.5.0 version is also release on the same day i.e. October 3rd 2023. 2.5.0 release introduces the following new features and enhancements:
Support for backward compatibility with previous 2.x versions of DataWeave:
- Compatibility flags retain previous Dataweave behavior at the Mule application level.
- Syntax of an earlier version of DataWeave is supported through the
%dw
directive (such as%dw 2.4
).Setting the directive to an earlier version of DataWeave avoids any syntax-breaking changes when the DataWeave runtime engine runs the script. - This script-level setting enables you to retain earlier behavior in some scripts while using the latest behavior in others.
- Dataweave syntax did not change between DataWeave versions 2.1 through 2.4.
Extended format support:
- ProtoBuf format support is available.
cXML
support in the XML format is available for reading and creating doctype directives (DTDs).
Extended type support:
- Loading type definitions from Java classes, JSON schemas, and XML schemas, and using the definitions in DataWeave scripts is supported.
- Creating new DataWeave types from existing types is supported.
- Specifying type parameters (similar to generics in other programming languages) of a function at the call site is supported. For details and examples,
- Introducing a Metadata Assignment Operator (
<~
) which enables you to set the metadata of any value without using theas
operator.
Memory management:
- DataWeave now uses a centralized memory service provided by the Mule runtime when executing in that context.
Refer to the below MuleSoft documentation for Dataweave module features:
- The Dtd module (
dw::xml::Dtd
) is new. - The toString function adds the
locale
parameter. - The Core annotation
@UntrustedCode()
changes to@UntrustedCode(privileges: Array<String>)
. - The concatWith function is new.
- The version function is new.