Home  >  Blog  >   MuleSoft  > 

Mulesoft Connectors

Mulesoft connectors are reusable extensions that allow you to interface Mule apps with third-party APIs, databases, and standard integration protocols. Their applications are unifying data to provide a single picture of the customer, automating business operations, and creating linked ecosystems. This blog will cover various Mulesoft connectors, their significance and their applications.

Rating: 4.6
  
 
483

A Mulesoft connector is a software that connects a Mule flow to an external resource. Any database, protocol, or API, can be used as a resource. You may build a connector with the Anypoint Connector DevKit and the Anypoint Studio IDE. Java version 6 or 7 is used to create a connection.

When working with big data, you may need to discover better solutions to handle problems like managing many data sets, enhancing service agility, and gaining real-time insights from all of your data—and Mulesoft can assist. Mulesoft is a software platform that integrates data from numerous sources, independent of their structure or business emphasis, due to its open design and adaptability.

Mulesoft Connectors - Table of Contents

  1. What are connectors in MuleSoft?
  2. Anypoint Connectors
  3. Advantages of using Connectors in Mulesoft
  4. How to enable Connectivity with Connectors?
  5. How do Connectors Work?
  6. How to Install a Connector?
  7. Different types of Mule Connectors

What are connectors in MuleSoft?

A connector is a software that connects a Mule flow to another system. Any content source, such as a database, protocol, or API, can be used as a resource. You may build a connector using the Anypoint Connector DevKit and the Anypoint Studio IDE. Java version 6 or 7 is typically used while establishing a connection.

According to the Connector design, Java EE components can interface with enterprise information systems (EISs), and EISs can communicate with Java EE components. EIS software includes enterprise resource planning (ERP), mainframe transaction processing, and nonrelational databases, to name a few.

According to the Connector design, Java EE components can interface with enterprise information systems (EISs), and EISs can communicate with Java EE components. EIS software includes enterprise resource planning (ERP), mainframe transaction processing, and nonrelational databases, to name a few.

1. Mule-Facing functionality: 

Mule, the runtime engine for Anypoint Platform, is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect programs and share data quickly and easily.

2. Target-Facing Functionality:

Target connections create requests, transmit them to integration participants, wait for answers, and return the responses to the gateway manager. Through the gateway manager, the integration gateway dynamically summons target connectors. By implementing the target connector interface given by the integration gateway, target connectors conform to a standard structure. Target connections can use all gateway management services by implementing this interface.

Do you want to get certified and build your career in Mulesoft? Then enrol in "Mulesoft Online Training" this course will help you to achieve excellence in this domain.

Anypoint Connectors

Anypoint Connectors are Mule extensions that allow you to send and receive data from other systems such as Salesforce, ServiceNow, Workday, Twitter, and others to create something new.

Mule apps may be connected to APIs and resources via Anypoint Connectors. Connectors allow you to transmit and receive data via a protocol or to and from an API from within Mule apps.

Mule and one or more external sources, such as files, databases, or Web services, are communicated via Anypoint Connectors. Connectors can be used as message sources by acting as incoming endpoints, a message processor that conducts an action in the middle of a flow, or the recipient of the final payload data after a flow.

Mule connectors can be either endpoint or operation-based:

1. End-Based Connectors:

Endpoint-based connectors can be one-way or request-response. They're usually (but not always) named after and based on a common data communication protocol, FTP or SMTP.

In a flow, endpoint-based connections can be specified as incoming or outbound endpoints in a flow. Inbound endpoints are used to send messages to a flow. Outbound endpoints might appear in the middle of a flow or at the end, conveying data to other systems.

2. Operations-Based connectors:

Operation-based connectors are named and centered around one or unique third-party APIs, and they follow an information exchange pattern depending on the operation you choose.

When you add an operation-based connector to your flow, you describe the operation that the connector will execute right away.

The connector's XML element changes depending on the operation you choose, and has the form connector Name: operation>. sfdc:query or sfdc:upsert-bulk, for example. The procedure you choose determines the remaining configuration attributes or child items.

 MindMajix YouTube Channel

Advantages of using Connectors in Mulesoft:

The following are some of the benefits of using connections in a Mule app:

  • Because you may connect a Mule app to a target system without knowing all of the information necessary to programme to the target system, it reduces code complexity.
  • Authentication against the target system is made easier.
  • DataWeave automatically infers metadata for the target system, making it easier to find and manipulate data.
  • It's easy to maintain the code because
  • Not all modifications to the target system necessitate app updates.
  • The connection configuration can be changed without needing other elements of the programme to be updated.

How to enable Connectivity with Connectors?

1. Connect with Software Applications

  • Connectors allow you to link a Mule app to a specific software application and conduct operations on that application.
  • Anypoint Connector for SAP (SAP Connector), for example, may automate sales order processing between SAP ERP and customer relationship management (CRM) software.
  • Anypoint Connector for Salesforce (Salesforce Connector) may also be used to connect Salesforce to other business applications such as ERP, analytics, and data warehousing systems.

2. Connect to Databases

  • Connectors allow you to link a Mule app to one or more databases and conduct operations on those databases.
  • Anypoint Connector for Databases (Database Connector), for example, may link a Mule app to any relational database engine. After that, you may run SQL queries against that database.
  • You may also connect a Mule app to a Hadoop Distributed File System using Anypoint Connector for Hadoop Distributed File System (HDFS Connector) (HDFS). Then you may read, write, receive, and send files on the HDFS server using databases like MongoDB and Hadoop file systems.

3. Connect to Protocols

  • Connectors can be used to send and receive data via protocols, as well as to conduct protocol operations in the case of some protocol connectors.
  • You may connect to an LDAP server and access Active Directory using Anypoint Connector for LDAP (LDAP Connector). Then you may create new user accounts, remove existing user accounts, or obtain user data like an email address or phone number.
  • Anypoint Connector for WebSockets (WebSockets Connector) may also be used to create a WebSocket for bidirectional and full-duplex communication between a server and a client, as well as to provide server push notifications.

How do Connectors Work?

Connectors can execute one or more jobs in an app, depending on their placement and the connector's capabilities. A connection can be used to:

  • The app flow begins with an incoming endpoint.
  • Connectors can perform this function with sources.
  • In the centre of a flow, a message processor executes activities.
  • An external endpoint from which the flow's final payload data is received.

How to Install a Connector?

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar to install a connector.
  2. Use your Anypoint Platform credentials to log in to Exchange.
  3. Click MuleSoft Provided from Anypoint Exchange.
  4. Install the Mule 3 connection.
Check out: MuleSoft Interview Questions

Different types of Mule Connectors

Some popular Mule Connectors are discussed below:

  1. Salesforce Connector
  2. SAP Connector
  3. Amazon S3 Connector
  4. Adobe Marketo Connector
  5. Ajax connector
  6. Amazon Kinesis Data Streams Connector

1. Salesforce Connector

  • Salesforce Connector allows you to construct apps that react to Salesforce events, such as adding, modifying, or removing objects, topics, documents, and channels.
  • Salesforce Connector is a tool that allows you to connect to Salesforce's APIs. This connector offers techniques for interacting with Salesforce, such as dealing with Apex classes.
  • This connection works with the Salesforce SOAP API, REST API, Bulk API, and Streaming API, depending on the operation you define. Over an HTTPS connection, each API call employs a request/response pattern. The connector includes the essential request headers, error handling, and HTTPS connection setups.

Prerequisites

  • You must be familiar with the following to utilise this connector:
  • SOAP, REST, Bulk, and Streaming APIs from Salesforce
  • Connectors for any point
  • Mule's execution engine (Mule)
  • In a Mule flow, there are elements and global elements.
  • Using Anypoint Studio to create a Mule app (Studio)
  • You must have the following items before creating an app:
  • A Salesforce developer account and a Salesforce security token are required to access the Salesforce target resource.
  • If you run Reset Security Token through My Personal Information from the Salesforce Setup pages, you'll get a new security token by email.
  • A secret and a consumer key (available in your Salesforce developer account)
  • If you're utilising OAuth authentication, you'll need to know where the namespace and schema are.

Limitations

  • Salesforce Connector does not disclose all of the Salesforce APIs' functionalities.
  • The Chatter API and the Tooling API are not accessible through Salesforce Connector.
  • New users' audience
  • Read this guide and use Anypoint Studio to construct your Mule app.
  • The Additional Configuration article will help you learn more about the connection.
  • Users with more experience
  • Read the sections on XML and Maven Support, Additional Configuration, and Examples.

Types of Authentication

The following authentication types are used by Salesforce Connector connections:

  • Authentication basics
  • Authentication is done with a username and password.
  • OAuth 2.0 is a protocol for authorising access to websites
  • User authentication is delegated to the service that hosts the user account.
  • JWT OAuth
  • User authentication is done via OAuth 2.0 and a JSON Web Token (JWT) request.
  • SAML OAuth
  • Requests an access token using OAuth 2.0 and a signed SAML 2.0 assertion.
  • Username and password for OAuth
  • Authentication is done using OAuth 2.0 and a user and password.

2. SAP Connector

Anypoint Connector for SAP (SAP Connector) facilitates data integration to and from SAP NetWeaver-based external systems.

Anypoint Platform's Design Center functionality does not include SAP Connector.

A separate licence is required for this connection. To evaluate or utilise this connection in production, contact MuleSoft.

Anypoint Connector for SAP, an SAP-certified Java connector that utilises the SAP Java Connector (JCo) libraries, is supported by the Mule runtime engine (Mule). SAP JCo makes it easier for an SAP backend system and a Java application to communicate. Using this library, Java programmes may connect to SAP systems and call Remote Function Modules. It can also parse IDocs (SAP Intermediate Documents) and various other object kinds. The SAP setup supports both inward and outbound connections.

  • Mule programmes can use the SAP JCo libraries to
  • BAPI functions can be used with the following RFC protocols:
  • RFC Synchronous Remote Function Call Synchronous Remote Function Call Synchronous Remote Function Call Synchronous (sRFC)
  • Remote Function Call RFC (Asynchronous Remote Function Call) (aRFC)
  • Assist in the creation of a BAPI across sRFC and aRFC by acting as a JCo server.
  • IDocs can be sent using tRFC and qRFC.
  • tRFC and qRFC are used to receive IDocs.
  • Transform SAP objects to and from XML (JCo function for BAPI and IDocs).

Prerequisites

You must be familiar with the following before using this connector:

  • The SAP Connector API is a programmatic interface that allows you to interact with SAP software
  • Connectors Anypoint
  • Engine for Mule's runtime (Mule)
  • In a Mule flow, you'll find both local and global features.
  • Using Anypoint Studio to create a Mule app (Studio)
  • You must have the following before developing an app:
  • To access the SAP target resource, you'll need the following credentials.
  • A working understanding of SAP's business environment, mainly the SAP R/3 Business Suite
  • From an administration standpoint, a fundamental grasp of the SAP NetWeaver Platform
  • ABAP is a programming language that may solve problems.
  • To get the SAP libraries, you'll need an SAP ID.
  • ECC and CRM, like other SAP products, run on top of NetWeaver Application Servers (NWAS). Therefore any client who uses the connection may access those systems.
  • Anypoint Studio knowledge on building a Mule app

Before you start building an app, go to the SAP website and save the IDoc, JCO, and JCO Native libraries version 3.1.x to a folder on your computer.

3. Ajax Connector

The Ajax Connector establishes a transport connection for sending and receiving messages asynchronously between an Ajax server and external Web resources.

Ajax stands for Asynchronous JavaScript and XML, a group of related technologies that make developing asynchronous Web applications more accessible. An incoming or outbound endpoint can be defined for the Ajax Connector.\

The Ajax connector in Anypoint Studio is the CometD connector, and it comes pre-installed.

Exchange: CometD Connector

The Ajax endpoint often connects your Mule flow to an external web page that may exchange data with a user in the Cloud. A JavaScript client linked to the webpage waits for user input, which it transmits to your flow for processing over the Ajax endpoint.

A Connector Configuration is a Global Element template used to configure the communication channel between the Ajax server and the Ajax endpoint.

Configuration in General

  • An Ajax endpoint is generally configured in two steps:
  • Choose where you want the Ajax endpoint to appear in your Mule flow, then drag it from the Palette to the proper spot in the processor sequence that makes up your Mule flow.
  • The Ajax endpoint functions as an inbound endpoint if placed at the start of the flow (that is, a message source for your application).
  • The Ajax connection acts as an outbound endpoint, whether it is placed in the middle or at the end of the flow.
  • By supplying values for the fields on the different tabs of the Ajax endpoint properties editor, which you access by double-clicking the Ajax symbol on the Message flow canvas, you may configure the Ajax endpoint (and the Connector Configuration it relies on to establish its transport channel).
Related blog: Differences between Dell Boomi and MuleSoft

4. Amazon Kinesis Data Streams Connector

The Anypoint Connector for Amazon Kinesis Data Streams (Amazon Kinesis Data Streams Connector) allows you to use Anypoint Platform to access regular Amazon Kinesis Data Stream operations.

Amazon Kinesis is an Amazon AWS streaming solution for collecting and processing vast streams of data records in real-time.

Prerequisites

To utilise this connector, you must be familiar with the following:

  • The Amazon Kinesis Data Streams API allows you to create data streams in Amazon Kinesis.
  • Connectors for any point
  • Mule's execution engine (Mule)
  • There are elements and global elements in a Mule flow.
  • Using Anypoint Studio to create a Mule app (Studio)

You must have the following items before creating an app:

  • Access Key credentials for the Kinesis, DynamoDB, and CloudWatch services from AWS Identity and Access Management (IAM). 
  • The Amazon Kinesis target resource is available for use.
  • Anypoint Studio 4.3.0 or later is required.

The Connector's Most Common Use Cases

The following are some of the most common use cases for the Kinesis Data Streams connector:

  • Troubleshooting: Gather log and event data from various locations, including servers, workstations, and mobile devices. The data is then continually processed, metrics are generated, live dashboards are powered, and the aggregated data is stored in data repositories such as Amazon S3.
  • Analytics in real-time: Run real-time analytics on high-frequency event data gathered by Amazon Kinesis Data Streams, such as sensor data or social media data. These analytics allow you to acquire insights from your data on a minute-by-minute basis rather than hours or days.
  • Data collection on the go: Allows your mobile apps to push data from hundreds of thousands of devices to Amazon Kinesis data streams, making the data available to you as fast as it is created on the mobile devices.

5. Adobe Marketo Connector

The Anypoint Connector for Adobe Marketo (Marketo Connector) is a closed-source connector that connects Mule and Adobe Marketo REST APIs. This connection implements all v1.0 Adobe Marketo API endpoints that are supported, as well as Mule 4 DataWeave capability.

Prerequisites

  • You must be familiar with Adobe Marketo, the Mule runtime engine (Mule), Anypoint Connectors, Anypoint Studio, Mule principles, elements in a Mule flow, and Global Elements in order to use this knowledge.
  • To test your connection to your target resource, you'll need login credentials.

Incorporate the Connector into your Studio project.

  • The connector  may be added to your Studio project in two ways: via the Exchange button in the Studio taskbar or from the Mule Palette view in Anypoint Studio.
  • The connector should be added. Create a Mule project in Exchange In Studio.
  • In the upper-left corner of the Studio taskbar, click the Exchange symbol (X).
  • Click Login in Exchange and enter your Anypoint Platform login and password.
  • Look for "Marketo" in Exchange.
  • Add the connection to the project by selecting it and clicking Add to project.

In Studio, add the Connector.

  • Create a Mule project in Studio.
  • Click (X) Search in Exchange in the Mule Palette view.
  • In the Add Modules to Project search area, type "Marketo."
  • In the Available modules section, click the name of this connection.
  • Select Add from the drop-down menu
  • Finish by clicking the Finish button.

6. Amazon S3 Connector

The Anypoint Connector for Amazon S3 (Amazon S3 Connector), connects to the Amazon S3 API, allowing you to utilise Amazon S3 to store objects, retrieve and use data with other AWS services, and construct internet-based applications.

Instant access to the Amazon S3 API offers smooth interfaces between Amazon S3 and other databases, content management systems (CMS) like Drupal, and customer relationship management systems (CRM) like Salesforce. Use Amazon S3 to store and retrieve any amount of data from anywhere on the internet. These operations may be completed utilising the AWS Management Console's straightforward online interface.

The Java API for AWS infrastructure services is provided through the AWS SDK for Java. The Java SDK is used to create the Amazon S3 connector.

Prerequisites

You must be familiar with the following to utilise this connector:

  • S3 API (Amazon Simple Storage Service)
  • Connectors for any point
  • Mule's execution engine (Mule)
  • In a Mule flow, there are elements and global elements.
  • Using Anypoint Studio to create a Mule app (Studio)
  • You must have the following items before creating an app:
  • Access to the Amazon S3 target resource credentials
  • Platform Anypoint
  • Anypoint Studio 7. x or later is required.
  • Amazon Web Services (AWS) is a cloud computing service
  • Credentials for AWS Identity, and Access Management (IAM)

The Connector's Most Common Use Cases

  • The Amazon S3 connection is commonly used in the following scenarios:
  • A URL is used to save a picture on Amazon S3, which is subsequently retrieved and displayed.
  • Create an image link in Amazon S3 and tweet the image link and the status update.

Types of Authentication

  • The following authentication methods are used with Amazon S3 connections:
  • Basic
  • Connects to Amazon S3 using a session token supplied by Amazon STS.
  • Role
  • Allows cross-account access by using the Amazon role ARN, which uniquely identifies the role.

Conclusion:

Let's wrap off our discussion of the newest Mulesoft Connectors. We examined the different concepts about integrating the most recent Mulesoft connectors and the use cases. The numerous connectors assist us in establishing connections with the Mule platform for a variety of objectives.

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
MuleSoft TrainingDec 03 to Dec 18
MuleSoft TrainingDec 06 to Dec 21
MuleSoft TrainingDec 10 to Dec 25
MuleSoft TrainingDec 13 to Dec 28
Last updated: 02 December 2022
About Author
Madhuri Yerukala

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

Recommended Courses

1 /15