Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Mule Kernel 4

DZone's Guide to

Mule Kernel 4

In this article, you will see what capabilities we have in the release of Mule Kernel 4. Explore development tools and connectors.

· Integration Zone ·
Free Resource

How to Transform Your Business in the Digital Age: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

In this article, I would like to write a little about new Mule 4 Kernel. As I have stated it earlier this is rebranded Mule 4 CE. In this article, you will see what capabilities we have in this release. Some of them we will investigate later on in forthcoming articles.

Mule Kernel 4

On the download page of Mule Kernel you will find information that Mule Kernel is licensed under Common Public Attribution License and its source code is publicly available on GitHub. It is clearly rebranded Community Edition.

Development Tools

On the MuleSoft website, there is information that Anypoint Studio is available for Mule Kernel. However, when we would like to install Kernel (Community Editon) runtime we do not have such an option. We may only install enterprise runtimes. It might be a mistake on the page that I was looking at or Anypoint Studio support for this is not ready yet. In the next article, I will describe how to do a community project and then deploy it in Kernel runtime.

You may also use IntelliJ IDEA with Mule 4 Runtime plugin. In that case, you do not have a graphical interface. You can only design flows in XML. This will also be described in more detail in a separate article.

Connectors

In this version, we have all community connectors. We do not get select or premium connectors. We can use safely following modules:

  • HTTP
  • FTP(S)
  • File
  • JMS
  • Database
  • VM
  • Web Service Consumer
  • Email
  • Socket

All other connectors available at Exchange are licensed and not accessible. As a result, when we need them we need to write modules on our own.

Expression Language

One of the biggest news was Mule Expression Language (MEL) removal from Mule 4. It was replaced with none other than DataWeave. It is then a big question for Kernel edition. On MuleSoft pages, you will find information that DataWeave transformation language is not available in the community version.

Based on my tests, I found out that DataWeave as expressionlanguage for choice etc. works perfectly fine. Here are two examples:

#[output application/java
---
{
"X-Header" : "0-1"
}]
#[vars.statusCode default 201]

The first example is obvious. We have an expression creating Java object containing one property called X-header. The second example is called an inline DataWeave. It is defined without output type (by default application/java is used). In the last example, 201 value is returned if statusCode is empty.

Why did it work? Probably because it is not in enterprise namespace and does not contain %dw 2.0 header.

Enterprise Features

Rest assured that when you use any enterprise feature application won't be deployed in Mule Kernel 4.x. In server logs, you will find Failed to deploy artifact error with information why it did not work. In the case below, namespace ee is not resolvable.

Failed to deploy application

Summary

This is just a big picture, but now you should know what connectors are available. Development environment (IDE) is still a big question. Why it does not support Kernel edition, but there is a workaround for this. Last but not least, for evaluating expressions DataWeave seems to work. When we try to use some enterprise feature like Dataweave transformation component or select connectors we will get an exception during deployment.

Reference page: runtime comparison.

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:
integration ,development tools ,connectors in mule 4 kernel ,mule 4 kernel ,expression language ,enterprise features

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}