Integration with Microsoft Azure using Mule ESB

11
www.sanjeetpandey.com www.sanjeetpandey.com Prepared by – Sanjeet Pandey Integration with Microsoft Azure using Mule ESB

Transcript of Integration with Microsoft Azure using Mule ESB

Page 1: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

www.sanjeetpandey.com

Prepared by – Sanjeet Pandey

Integration with Microsoft Azure using Mule ESB

Page 2: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Overview

- MuleSoft provides the most widely used integration platform to connect any application, dataservice or API, across the cloud and on-premise continuum.

- Microsoft Azure is cloud-based data-storage infrastructure that is accessible to the userprogrammatically via a MuleSoft ‘Microsoft Service Bus’ connector..

- The Microsoft Service Bus Mule connector allows developers to access any amount of data, atany time, from anywhere on the web. With connectivity to the Microsoft Azure API, users caninterface Azure to store objects, download and use data with other Azure services, and buildapplications that call for internet storage - all from within MuleSoft Anypoint Platform.

2

Page 3: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Prerequisites

• Microsoft Azure Account

• Microsoft Azure Namespace, Shared Access Key Name and Shared Access Key

• Mule Anypoint Microsoft Service Bus Connector

Microsoft Azure Account

To complete this sample, you need an Azure account. You can activate your MSDN subscriber benefits or sign up for a free trial.

3

Page 4: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Creating Microsoft Azure Namespace

To begin using Service Bus topics and subscriptions in Azure, you must first create a service namespace. A service namespace provides a scoping container for addressing Service Bus resources within your application.

• Log on to the Azure Management Portal.

• In the left navigation pane of the Management Portal, click Service Bus.

• In the lower pane of the Management Portal, click Create.

• In the Add a new namespace dialog, enter a namespace name. The system immediately checks to see if the name is available.

4

Page 5: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Microsoft Azure Shared Access Name and Key

Click Connection Information. In the Access connection information dialog, find the connection string that contains the SAS key and key name. Make a note of these values, as you will use this information later to perform operations with the namespace.

5

Page 6: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Mule Anypoint Microsoft Azure Connector

Configuration: This element must be placed outside of yourflows and at the root of your Mule application. You cancreate as many configurations as you deem necessaryas long as each carries its own name.

Connection Pool : Azure connector offers automaticconnection management via the use of a connectionpool. The pool will act a storage mechanism for all theconnections that are in-use by the user of thisconnector.

Reconnection Strategies : Reconnection Strategies specifyhow a connector behaves when its connection fails.You can control how Mule attempts to reconnect byspecifying a number of criteria

6

Page 7: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Mule flow

Steps to be followed for integrating 'Microsoft Azure' with MuleSoft Applications:

• Install the Microsoft Service Bus Connector in Anypoint Studio (3.5 and above) http://repository.mulesoft.org/connectors/releases/3.5

• Create a new Anypoint Studio Project and Flow.

• Before using the Microsoft Service Bus Connector in the Mule Flows, create a global element for ‘Microsoft Service Bus: Azure Service Bus’ configuration which can be reused in all other flows across the Mule project - wherever the objects are created & deleted to & from Microsoft Azure cloud server.

7

Page 8: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Mule Flow (cont.)

• Configure the ‘Microsoft Service Bus: Azure Service Bus’ connector by providing the following information for the global element

– Service Namespace

– Shared Access Key Name

– Shared Access Key

• Use HTTP inbound endpoint to hit the service to pull the list of queues from the Microsoft Azure storage server

• Configure the Microsoft Service Bus endpoint by providing the following to fetch the list of queues from the Azure server -

– link to the ‘global Connector Configuration’

– Operation

8

Page 9: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Mule Flow (cont.)

Mule XML -

9

Page 10: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com

Output

Mule QueueList output -

10

Page 11: Integration with Microsoft Azure using Mule ESB

www.sanjeetpandey.com 11