# mulesoft Connectors - Full Documentation --- product: Connectors --- # Anypoint Connector Configuration > For the full documentation index, see: https://docs.mulesoft.com/llms.txt You can configure a connector using [Anypoint Studio](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) or [XML](https://docs.mulesoft.com/connectors/introduction/intro-config-xml-maven). You should understand connector configuration requirements and best practices before configuring a connector. ## Connector Configuration Requirements Because a connector is a component in a Mule app, you should know how to configure a Mule app before you try to configure a connector. For information, see [Mule Application Development](https://docs.mulesoft.com/mule-runtime/latest/mule-app-dev). Every connector has specific configuration requirements, which are described in the reference guide for that connector. Although connectors have different configuration requirements, most connector configurations require that you configure: - A source to initiate the app flow - The authorization credentials needed to connect to the connector’s data source, for example, to the Salesforce Marketing Cloud, Amazon S3, or SAP Concur APIs. Most connectors use the Basic (username and password), OAuth, or OAuth2 authentication schemes. - A connector operation to perform the desired action ### Configure a Source To configure a source for a connector, select a source associated with the connector you are configuring, or select the HTTP Listener operation or Scheduler endpoint. Not all connectors have associated sources. For more information, see: - [Sources](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors#input-sources) - [HTTP Connector](https://docs.mulesoft.com/http-connector/latest/#input-sources) - [Scheduler Endpoint (Trigger)](https://docs.mulesoft.com/mule-runtime/latest/scheduler-concept) To determine whether the connector you are working with has its own sources, see the reference guide for that connector. ### Authorization Credentials Connectors that connect to external APIs use the Basic (username and password), OAuth, or OAuth2 authentication scheme. To configure authorization credentials for a connector, create a [global element](#global-element), which enables you to reuse the configuration for other connector instances. ### Connector Operations Connector operations are calls to external APIs or other connectivity-related actions that a connector can perform. You can use connector operations anywhere in a flow. Each connector has different supported operations. To view a list of supported operations for a specific connector, see the reference guide for that connector. ## Best Practices for Configuring Connectors The following best practices apply to configuring connectors: - Use a global element to define configuration details that can be shared with other instances of the connector in the flow. - Use property-value placeholders to configure a connector in Anypoint Studio or to configure the connector using XML outside the Studio editor. - Configure a reconnection strategy to set the number of reconnection attempts to try after an initial failure. - When you finish the configuration, test the connectivity before you deploy it. ### Use a Global Element to Define Configuration Details Global elements act as reusable objects. When you configure a global element for a connector, other instances of that connector in the flow can share that global element. Create one global element to configure your connection, configuration, or transport details for the connector. Reference the global element from other instances of the connector in the flow to ensure consistency across flow elements. In addition creating reusability and consistency, global elements make connector maintenance easier. If you must change a connector’s configuration, you can change the configuration in the global element, to apply that change to all connector instances that reference that global element. Most connectors support the use of a global element for authentication and other functions. For information about configuring a global element for a specific connector, see the user guide for that connector. ### Use Property Placeholders for Property Values Instead of using static values for a connector configuration in Studio, you can use [Ant-style](https://ant.apache.org/) property placeholders, as shown in this Studio example: ![Configuring property placeholders](/mulesoft/current/en-us/connectors/_images/intro-config-overview-properties.png) Figure 1. Use ANT-style property placeholders for maintainability - The first item is a placeholder for the Anypoint Connector for Amazon SQS (Amazon SQS) access key. - The second item is a placeholder for the Amazon SQS secret key. Using property placeholders improves the maintainability of your applications because they enable you to change configuration values in one place. If you don’t use property placeholders and configuration parameter values change, you must search for changed parameters in the connector configuration screens or configuration XML. To make the values for the placeholders available, create a YAML file or properties file to contain the values, place the file in `src/main/resources` in the Mule project, and then reference the file from the connector configuration. To reference a file that stores property values in Studio: 1. Open the **Global Elements** tab and click **Create**. 2. Search for the element called **Configuration properties**. 3. Select **Configuration properties**. 4. Click **OK**. 5. Click **…​** to the right of the **File** field and navigate to your YAML or properties file. To reference a file that stores property values when configuring a connector using XML: 1. Include a `` element inside the `` element. 2. Set the `file` parameter with your properties file name: ```xml ` ... ``` For more information about using property placeholders, see [Configure Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure). ### Test the Connectivity of the Connector Studio enables you to test the connection between a connector and its data source by clicking a button. In Studio, after you configure the required connection values in the **Global Element Properties** screen, click **Test Connection**: ![Test the connection button in Studio](/mulesoft/current/en-us/connectors/_images/intro-config-overview-studio-test.png) Figure 2. Click the **Test Connection** button in Studio to test the connection ### Configure a Reconnection Strategy for the Connector When a Mule app starts, a connectivity test runs on connectors that must connect to an external server. If the test fails, the default behavior is to log a warning message and continue with the deployment of the app, instead of blocking the deployment. You can modify this behavior by setting the number of reconnection attempts to try after an initial failure and forcing the deployment to fail when all connection attempts fail. To configure a reconnection strategy for a connector using Studio, use the **Advanced** tab in the global element configuration **General** tab. The following example configures a reconnection strategy that: - Forces the deployment to fail if the connection fails and configured reconnection attempts are exhausted - Limits the number of reconnection attempts to five at a frequency of every 4000 milliseconds (ms) ![Reconnection strategy example using Studio](/mulesoft/current/en-us/connectors/_images/intro-config-overview-reconnection-strategy-studio.png) Figure 3. Use the fields in the Reconnection section of the global element to specify a reconnection strategy To determine whether a specific connector supports a reconnection strategy and to obtain information about reconnection strategy settings, see the reference guide for that connector. ## See Also - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Use XML to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-xml-maven) - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Anypoint Connectors Overview > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connectors are reusable extensions to Mule runtime engine (Mule) that enable you to integrate your apps with third-party APIs, databases, and standard integration protocols without writing complex code. You can connect to target systems, authenticate securely, and transform data while connectors handle the technical details. Use connectors to reduce development time and simplify maintenance as systems evolve. Using connectors in a Mule app provides the following advantages: - Reduces code complexity, because you can connect a Mule app to a target system without knowing all of the details required to program to the target system - Simplifies authenticating against the target system - Proactively infers metadata for the target system, which makes it easier to identify and transform data with DataWeave - Makes code maintenance easier because: - Not all changes in the target system require changes to the app. - The connector configuration can be updated without requiring updates to other parts of the app. ## Enable Connectivity with Connectors Use connectors to connect a Mule app to specific software applications, databases, and protocols. For a list of the MuleSoft-built connectors, see [Connectors](https://docs.mulesoft.com/connectors/). ### Connect to Software Applications You can use connectors to connect a Mule app to specific software applications and to perform actions on the connected application. For example, you can use Anypoint Connector for SAP (SAP Connector) to automate sales order processing between SAP ERP and your customer relationship management (CRM) software. Likewise, you can use Anypoint Connector for Salesforce (Salesforce Connector) to integrate Salesforce with other business applications, such as ERP, analytics, and data warehouse systems. ### Connect to Databases You can use connectors to connect a Mule app to one or more databases and to perform actions on the connected database. For example, you can use Anypoint Connector for Databases (Database Connector) to connect a Mule app to any relational database engine. Then you can perform SQL queries on that database. Likewise, you can use Anypoint Connector for Hadoop Distributed File System (HDFS Connector) to connect a Mule app to a Hadoop Distributed File System (HDFS). Then you can integrate databases such as MongoDB with Hadoop file systems to read, write, receive files, and send files on the HDFS server. ### Connect to Protocols You can use connectors to send and receive data over protocols and, for some protocol connectors, to perform protocol operations. For example, you can use Anypoint Connector for LDAP (LDAP Connector) to connect to an LDAP server and access Active Directory. Then you can add user accounts, delete user accounts, or retrieve user attributes, such as the user’s email or phone number. Likewise, you can use Anypoint Connector for WebSockets (WebSockets Connector) to establish a WebSocket for bidirectional and full-duplex communication between a server and client, and to implement server push notifications. ## How Connectors Work Connectors can perform one or more functions in an app, depending on where you place them and the capabilities of the specific connector. A connector can act as: - An inbound endpoint that starts the app flow Connectors that have [sources](#input-sources) can perform this function. - A message processor that performs [operations](#operations) in the middle of a flow - An outbound endpoint that receives the final payload data from the flow ### Sources Some connectors have sources, or "triggers". These components enable a connector to start a Mule flow by receiving information from the connector’s resource. For example, when a Salesforce user updates a sales opportunity, a flow that starts with a Salesforce Connector component can receive the information and direct it to a database connector for processing. To see if a connector can act as a source, see the Reference Guide for the connector. App developers can also use an HTTP Listener or Scheduler as a source for a flow: - HTTP Listener is a connector that listens to HTTP requests. You can configure an HTTP Listener to start a flow when it receives specified requests. - Scheduler is a core component that starts a flow when a time-based condition is met. You can configure a Scheduler to start a flow at regular intervals, or you can specify a more flexible cron expression to start the flow. For more information about HTTP Listener and the Scheduler component, see the [HTTP Connector User Guide](https://docs.mulesoft.com/http-connector/latest/) and [Scheduler Endpoint (Trigger)](https://docs.mulesoft.com/mule-runtime/latest/scheduler-concept). ### Operations Most connectors have operations that execute API calls or other actions on their associated system, database, or protocol. For example, you can use Anypoint Connector for Workday (Workday Connector) to create a position request in Workday or add a fund to the financial management service. Likewise, you can use Anypoint Connector for VMs (VM Connector) to consume messages from and publish messages to an asynchronous queue. To see a list of operations for a connector, see the Reference Guide for that connector. ## Access Connectors and Related Assets Anypoint Exchange provides access to all publicly available connector assets including connectors, templates, and examples. ### Connectors in Exchange You can use Exchange as a starting point for discovering all or a subset of MuleSoft-built connectors. For information about locating connectors in Exchange, see [Discover and Add Connectors to Studio](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange#discover-add-connectors). ### Templates in Exchange Templates provide starting points for creating Anypoint Studio projects. Many templates include one or more connector configurations. For example, the S/4HANA Cloud to Salesforce Partner Migration template helps you migrate partners from an SAP S/4HANA Cloud to a Salesforce instance. After you configure a template in Studio, you can customize it to meet your needs. For information about locating and using templates, see [Discover and Add Templates to Studio](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange#discover-add-templates). ### Examples in Exchange Examples are apps that demonstrate how to implement a use case or solution. Many examples use one or more connectors to accomplish required tasks. For example, the Authenticating Salesforce Using OAuth 2.0 example shows you how to connect to Salesforce using OAuth as the security protocol. It uses Salesforce Connector to enable OAuth authentication before performing the integration process. For information about locating and using examples, see [Discover and Add Examples to Studio](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange#discover-add-examples). ## Connector Support Categories Anypoint Connectors have the following categories of support: - Select connectors are available to anyone. However, you must have an Anypoint Platform subscription to access MuleSoft support for these connectors. - Premium connectors are available to licensed users only. Premium Anypoint Connectors must be licensed for each deployment environment (Production, Staging, Test, Sandbox, Dev, Disaster Recovery, and so on). For example, if you have multiple staging environments, you must have an active premium connector license for _each_ staging environment. - Mulesoft Certified connectors are developed by MuleSoft’s partners and developer community and subsequently reviewed and certified by MuleSoft. Access and support for these connectors is through MuleSoft partners. For more information about connector support categories, see the [Product Versioning and Back Support Policy](https://www.salesforce.com/en-us/wp-content/uploads/sites/4/documents/legal/Agreements/versioning-back-support-policy.pdf). ## Where to Get Additional Information Access the Release Notes, User Guide, and Reference Guide for a connector to view connector-specific information: - Connector Release Notes provide compatibility information for a connector, information about new features, and a list of issues fixed in a release. - Connector User Guides provide instructions for configuring the associated connector and configuration examples. - Connector Reference Guides provide a list of supported sources (if any) and operations for the associated connector. They also provide field descriptions for connector configurations and connection types. ## See Also - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Anypoint Connectors Release Notes > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following release notes are provided for Anypoint Connectors: ## Connector Release Notes for Mule 4 - [A2A Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/a2a-connector-release-notes-mule-4) - [Adobe Marketo Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/marketo-connector-release-notes-mule-4) - [Agentforce Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/agentforce-connector-release-notes-mule-4) - [Aggregators Module Release Notes](https://docs.mulesoft.com/release-notes/connector/aggregators-module-release-notes) - [Amazon Bedrock Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-bedrock-connector-release-notes-mule-4) - [Amazon DynamoDB Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-dynamodb-connector-release-notes-mule-4) - [Amazon EC2 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-ec2-connector-release-notes-mule-4) - [Amazon Kinesis Data Streams Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-kinesis-connector-release-notes-mule-4) - [Amazon Lambda Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-lambda-connector-release-notes-mule-4) - [Amazon RDS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-rds-connector-release-notes-mule-4) - [Amazon Redshift Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-redshift-connector-release-notes-mule-4) - [Amazon S3 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-s3-connector-release-notes-mule-4) - [Amazon Secrets Manager Properties Provider Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-secrets-manager-properties-provider-release-notes-mule-4) - [Amazon SNS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-sns-connector-release-notes-mule-4) - [Amazon SQS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/amazon-sqs-connector-release-notes-mule-4) - [AMQP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-amqp) - [Anypoint MQ Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/anypoint-mq-connector-release-notes-mule-4) - [Apache Cassandra Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/cassandra-connector-release-notes-mule-4) - [Apache Kafka Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/kafka-connector-release-notes-mule-4) - [AS2 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/as2-connector-release-notes-mule-4) - [Asana Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/asana-connector-release-notes-mule-4) - [Azure Cosmos DB Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-cosmos-db-connector-release-notes-mule-4) - [Azure Data Lake Storage Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-data-lake-connector-release-notes-mule-4) - [Azure Event Hubs Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-event-hubs-connector-release-notes) - [Azure Key Vault Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-key-vault-connector-release-notes-mule-4) - [Azure Key Vault Properties Provider Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-key-vault-properties-provider-release-notes-mule-4) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Azure Service Bus Management Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-mgmt-connector-release-notes-mule-4) - [Bird Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/bird-connector-release-notes-mule-4) - [Blackboard Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/blackboard-connector-release-notes-mule-4) - [Box Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/box-connector-release-notes-mule-4) - [Canvas Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/canvas-connector-release-notes-mule-4) - [CAQH Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/caqh-connector-release-notes-mule-4) - [CloudHub Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/cloudhub-connector-release-notes-mule-4) - [Coda Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/coda-connector-release-notes-mule-4) - [Compression Module Release Notes](https://docs.mulesoft.com/release-notes/mule-runtime/module-compression) - [Confluent Schema Registry Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/confluent-schema-registry-connector-release-notes-mule-4) - [Cryptography Module Release Notes](https://docs.mulesoft.com/release-notes/connector/cryptography-module-release-notes) - [D2L Brightspace Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/d2l-brightspace-connector-release-notes-mule-4) - [Database Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-db) - [DHL Tracking Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/dhl-tracking-connector-release-notes-mule-4) - [DocuSign Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/docusign-connector-release-notes-mule-4) - [Dropbox Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/dropbox-connector-release-notes-mule-4) - [EDIFACT EDI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/edifact-edi-connector-release-notes) - [Einstein AI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/einstein-ai-connector-release-notes-mule-4) - [Email Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-email) - [File Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-file) - [FTP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-ftp) - [FTPS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-ftps) - [Gmail Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/gmail-connector-release-notes-mule-4) - [Google BigQuery Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/google-bigquery-connector-release-notes-mule-4) - [Google Calendar Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/google-calendar-connector-release-notes-mule-4) - [Google Drive Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/google-drive-connector-release-notes-mule-4) - [Google Gemini Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/google-gemini-connector-release-notes-mule-4) - [Google Pub/Sub Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/google-pubsub-connector-release-notes-mule-4) - [Google Sheets Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/google-sheets-connector-release-notes-mule-4) - [gRPC Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/grpc-connector-release-notes-mule-4) - [Hadoop (HDFS) Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/hdfs-connector-release-notes-mule-4) - [HL7 EDI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/hl7-connector-release-notes-mule-4) - [HL7 MLLP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/hl7-mllp-connector-release-notes-mule-4) - [HTTP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-http) - [HTTP Service Release Notes](https://docs.mulesoft.com/release-notes/mule-runtime/service-http-release-notes) - [IBM CTG Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ibm-ctg-connector-release-notes-mule-4) - [IBM MQ Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-ibm-mq) - [Informatica Business 360 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/informatica-b360-connector-release-notes-mule-4) - [Intercom Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/intercom-connector-release-notes-mule-4) - [Java Module Release Notes](https://docs.mulesoft.com/release-notes/connector/java-module) - [Jira Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/jira-connector-release-notes-mule-4) - [JMS Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-jms) - [JSON Module Release Notes](https://docs.mulesoft.com/release-notes/connector/json-module-release-notes) - [Kerberos Module Release Notes](https://docs.mulesoft.com/release-notes/connector/kerberos-module) - [LDAP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ldap-connector-release-notes-mule-4) - [Mailchimp Marketing Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mailchimp-marketing-connector-release-notes-mule-4) - [MCP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mcp-connector-release-notes-mule-4) - [Microsoft .NET Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-dotnet-connector-release-notes-mule-4) - [Microsoft Dynamics 365 Business Central Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-dynamics-365-business-central-connector-release-notes-mule-4) - [Microsoft Dynamics 365 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-dynamics-365-connector-release-notes-mule-4) - [Microsoft Dynamics 365 for Finance and Operations Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-365-ops-connector-release-notes-mule-4) - [Microsoft Dynamics AX 2012 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ms-dynamics-ax-connector-release-notes-mule-4) - [Microsoft Dynamics CRM Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ms-dynamics-crm-connector-release-notes-mule-4) - [Microsoft Dynamics GP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-dynamics-gp-connector-release-notes-mule-4) - [Microsoft Dynamics NAV Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ms-dynamics-nav-connector-release-notes-mule-4) - [Microsoft Excel Online Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-excel-online-connector-release-notes-mule-4) - [Microsoft MSMQ Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/msmq-connector-release-notes-mule-4) - [Microsoft OneDrive Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-onedrive-connector-release-notes-mule-4) - [Microsoft Outlook 365 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-outlook-365-connector-release-notes-mule-4) - [Microsoft Power BI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-power-bi-connector-release-notes-mule-4) - [Microsoft Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/ms-service-bus-connector-release-notes-mule-4) - [Microsoft SharePoint Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sharepoint-connector-release-notes-mule-4) - [Microsoft Teams Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-teams-connector-release-notes-mule-4) - [Microsoft Windows PowerShell Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/microsoft-powershell-connector-release-notes-mule-4) - [MongoDB Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mongodb-connector-release-notes-mule-4) - [Moodle Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/moodle-connector-release-notes-mule-4) - [MQTT Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mqtt3-connector-release-notes) - [MuleSoft AI Chain Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mulesoft-ai-chain-connector-release-notes-mule-4) - [MuleSoft Inference Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mulesoft-inference-connector-release-notes-mule-4) - [MuleSoft Vectors Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mulesoft-vectors-connector-release-notes-mule-4) - [MuleSoft WebCrawler Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/mulesoft-webcrawler-connector-release-notes-mule-4) - [Neo4J Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/neo4j-connector-release-notes-mule-4) - [NetSuite Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/netsuite-connector-release-notes-mule-4) - [NetSuite OpenAir Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/netsuite-openair-connector-release-notes-mule-4) - [NetSuite REST Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/netsuite-rest-connector-release-notes-mule-4) - [NetSuite Restlet Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/netsuite-restlet-connector-release-notes-mule-4) - [Notion Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/notion-connector-release-notes-mule-4) - [OAuth Module Release Notes](https://docs.mulesoft.com/release-notes/connector/oauth-module-release-notes) - [OAuth2 Provider Module Release Notes](https://docs.mulesoft.com/release-notes/connector/oauth2-provider-release-notes) - [Object Store Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/object-store-connector-release-notes-mule-4) - [OpenAI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/openai-connector-release-notes-mule-4) - [OpenWeatherMap Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/openweathermap-connector-release-notes-mule-4) - [Oracle EBS 12.1 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/oracle-ebs-connector-release-notes-mule-4) - [Oracle EBS 12.2 Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/oracle-ebs-122-connector-release-notes-mule-4) - [Oracle PeopleSoft Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/peoplesoft-connector-release-notes-mule-4) - [Oracle Siebel Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/siebel-connector-release-notes-mule-4) - [PagerDuty Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/pagerduty-connector-release-notes-mule-4) - [QuickBooks Online Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/quickbooks-online-connector-release-notes-mule-4) - [Redis Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/redis-connector-release-notes-mule-4) - [Roostify Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/roostify-connector-release-notes-mule-4) - [RosettaNet Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/rosettanet-connector-release-notes-mule-4) - [Salesforce Commerce Cloud B2C Data Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/commerce-cloud-b2c-data-connector-release-notes-mule-4) - [Salesforce Commerce Cloud Shop API Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/shop-api-connector-release-notes-mule-4) - [Salesforce Composite Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-composite-connector-release-notes-mule-4) - [Salesforce Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-connector-release-notes-mule-4) - [Salesforce Data Cloud Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-data-cloud-connector-release-notes-mule-4) - [Salesforce Einstein Analytics Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-analytics-connector-release-notes-mule-4) - [Salesforce Marketing Cloud Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-mktg-connector-release-notes-mule-4) - [Salesforce Marketing Cloud REST Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-marketing-cloud-rest-connector-release-notes-mule-4) - [Salesforce Pub/Sub Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/salesforce-pubsub-connector-release-notes-mule-4) - [SAP Concur Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-concur-connector-release-notes-mule-4) - [SAP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-connector-release-notes-mule-4) - [SAP S/4HANA OData Cloud Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-s4-hana-connector-release-notes-mule-4) - [SAP S/4HANA SOAP Cloud Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-s4-hana-soap-cloud-connector-release-notes-mule-4) - [SAP SuccessFactors Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-successfactors-connector-release-notes-mule-4) - [Scripting Module Release Notes](https://docs.mulesoft.com/release-notes/mule-runtime/module-scripting) - [Secure Configuration Properties Extension Release Notes](https://docs.mulesoft.com/release-notes/mule-runtime/secure-properties) - [ServiceNow Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/servicenow-connector-release-notes-mule-4) - [SFTP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-sftp) - [Shippo Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/shippo-connector-release-notes-mule-4) - [ShipStation Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/shipstation-connector-release-notes-mule-4) - [Shopify Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/shopify-connector-release-notes-mule-4) - [Slack Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/slack-connector-release-notes-mule-4) - [Smartsheet Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/smartsheet-connector-release-notes-mule-4) - [Snowflake Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/snowflake-connector-release-notes-mule-4) - [Sockets Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-sockets) - [Spring Module Release Notes](https://docs.mulesoft.com/release-notes/connector/spring-module-release-notes) - [Stripe Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/stripe-connector-release-notes-mule-4) - [Tableau Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/tableau-specialist-connector-release-notes-mule-4) - [Teamwork Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/teamwork-connector-release-notes-mule-4) - [Tracing Module Release Notes](https://docs.mulesoft.com/release-notes/connector/tracing-module-release-notes) - [TRADACOMS EDI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/tradacoms-edi-connector-release-notes-mule-4) - [Trello Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/trello-connector-release-notes-mule-4) - [Twilio Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/twilio-connector-release-notes-mule-4) - [Validation Module Release Notes](https://docs.mulesoft.com/release-notes/mule-runtime/module-validation) - [Veeva Vault Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/veeva-vault-release-notes-mule-4) - [VM Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-vm) - [Web Service Consumer Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-wsc) - [WebSockets Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/websockets-connector-release-notes-mule-4) - [Workable Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/workable-connector-release-notes-mule-4) - [Workday Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/workday-connector-release-notes-mule-4) - [WSS Module Release Notes](https://docs.mulesoft.com/release-notes/connector/wss-module-release-notes-mule-4) - [X12 EDI Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/x12-edi-connector-release-notes-mule-4) - [Xero Accounting Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/xero-accounting-connector-release-notes-mule-4) - [XML Module Release Notes](https://docs.mulesoft.com/release-notes/mule-runtime/module-xml) - [Zendesk Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/zendesk-connector-release-notes-mule-4) - [Zoom Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/zoom-connector-release-notes-mule-4) - [Zuora AQuA Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/zuora-aqua-release-notes-mule-4) - [Zuora Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/zuora-connector-release-notes-mule-4) ## See Also - [Known Issues](https://help.salesforce.com/s/issues) --- product: Connectors --- # Anypoint Connectors Shared Responsibilities > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The successful operation of Anypoint Connectors is a shared responsibility between MuleSoft and the customer. It is critical to understand which areas customers are responsible for and which areas MuleSoft is responsible for. We have created this page as a helpful summary for you to better understand the different responsibilities. However this page is provided for convenience only as all support obligations are subject to your executed agreement with MuleSoft. ## Anypoint Connectors Categories Anypoint Connectors fall into these categories: - **Premium** These connectors must be purchased as add-ons to an Anypoint Platform subscription and are available to licensed users only. - **Select** These connectors are included with a paid MuleSoft subscription. Select and Premium connectors can further be categorized as: - **Connectors or modules that enable connectivity to MuleSoft or Salesforce applications** For example, Salesforce Marketing Cloud Connector or Anypoint MQ Connector. - **Connectors that enable the use of cross-platform protocols or open APIs** For example, Database Connector, which is based on Oracle’s JDBC protocol. - **Connectors that enable connectivity to third-party or partner APIs** For example, Azure Key Vault Connector or Stripe Connector. - **MuleSoft Certified** Connectors developed by MuleSoft’s partners and subsequently reviewed and certified by MuleSoft, for example, ESRI Connector. For these connectors, MuleSoft takes initial support calls and isolates the issue for resolution. MuleSoft disclaims any additional support obligation for MuleSoft Certified Connectors. For additional support of MuleSoft Certified Connectors, contact the MuleSoft partner who created the connector. - **Community** Connectors developed by the MuleSoft developer community. For example, Slack Connector. ## Shared Responsibilities The following table clarifies the responsibilities that customers and MuleSoft share for Anypoint Connectors:
Type of ConnectorMuleSoft ResponsibilitiesCustomer Responsibilities

Premium or Select: Connectors or modules that enable connectivity to MuleSoft or Salesforce applications.

For example:

  • Salesforce Marketing Cloud Connector

  • Anypoint MQ Connector

Support for the connector source code and the functionalities that the connector provides.

  • Ensure that the connector versions and Mule runtime engine (Mule) versions are up to date with the latest version released by MuleSoft.

  • Grant roles and permissions for access to resources.

  • Check the shared libraries, plugin dependencies, configuration files, templates, scripts, proxies, and network configuration.

  • Check the third-party driver limitations, load balancing, parallel processing, and authentication protocols.

  • Check performance issues in destination servers and partner applications.

Premium or Select Connectors: Connectors that enable the use of cross-platform protocols or open APIs.

For example:

  • Database Connector

  • JMS Connector

  • SFTP Connector

  • X12 Connector

  • EDIFACT Connector

  • TRADACOMS EDI Connector

  • Support for the connector source code, its packaged libraries, and the functionalities the connector provides.

  • MuleSoft incorporates specific industry-standard message specifications into these connectors, but is not responsible for the partner system or domain technology configuration.

  • Ensure that the connector and Mule runtime engine (Mule) versions are updated with the latest version released by MuleSoft.

  • Grant roles and permissions for access to resources.

  • Check the shared libraries, plugin dependencies, configuration files, templates, scripts, proxies, and network configuration.

  • Check the third-party driver limitations, load balancing, parallel processing, and authentication protocols.

  • Check performance issues in destination servers and partner applications.

  • Check with the partner their system or domain configuration, and technology, for example database and JMS broker administration.

Premium or Select Connectors: Connectors that enable connectivity to third-party or partner APIs.

For example:

  • Stripe Connector

  • Azure Key Vault Connector

  • Support for the connector source code, connector packaged libraries, and the functionalities the connector provides.

  • MuleSoft is not responsible for specific third-party SDK libraries. MuleSoft uses APIs provided by the partner, but it is not responsible for these third-party provider configurations and does not provide assistance with issues related to the drivers or APIs that the connector uses in the background. For underlying third-party configuration or issues, contact the third-party provider directly.

  • Ensure that the connector version and Mule version are up to date with the latest version released by MuleSoft.

  • Implement the driver of your choice to configure third-party SDK libraries.

  • Review the third-party API specification documentation for configuration information.

  • Grant roles and permissions for access to resources.

  • Check the shared libraries, plugin dependencies, configuration files, templates, scripts, proxies, and network configuration.

  • Check the third-party driver limitations, load balancing, parallel processing, and authentication protocols.

  • Check the performance issues in destination servers and partner applications.

  • Check with the third-party or partner who provides security updates and apply modifications to the underlying endpoints. Third parties and partners can assist with using third-party APIs and drivers and with configuring SDK libraries.

## See Also - [Product Versioning and Back Support Policy](https://www.salesforce.com/en-us/wp-content/uploads/sites/4/documents/legal/Agreements/versioning-back-support-policy.pdf) --- product: Connectors --- # Configuring OAuth 2.0 for Connectors > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Many services enable you to use an OAuth 2.0 authentication scheme for increased security when interacting with their APIs. Many connectors support configuring a standard OAuth 2.0 setup. ## Prerequisites To configure OAuth 2.0 for a connector, you must have access to the following: - OAuth provider (Okta, Azure AD, Google, PingFederate, and so on) - Anypoint Studio ## OAuth 2.0 Configuration Fields Here are the configuration fields typically available for OAuth 2.0 for connectors. For more information, see [OAuth](https://docs.mulesoft.com/mule-sdk/latest/oauth). **OAuth 2.0 Authorization Code:**
NameTypeDescriptionDefault ValueRequired

Consumer Key

String

OAuth consumer key, as registered with the service provider.

X

Consumer Secret

String

OAuth consumer secret, as registered with the service provider.

X

Authorization URL

String

URL of the service provider’s authorization endpoint in which the user is redirected to provide their user credentials. This URL typically ends with /authorize.

X

Access Token Url

String

URL of the service provider’s access token endpoint in which the app automatically exchanges an authorization code for an access token.

X

Scopes

String

Space-delimited list of OAuth scopes to request during the OAuth dance. This value defaults to the scopes in the annotation.

offline_access

Resource Owner ID

String

ID of the resource owner’s account that authorizes the connector to access their resources.

Auth Server Tls Context

TLS Context

TLS context to use for HTTP requests to the authorization server during the OAuth dance. Available in Mule runtime 4.10.0 and later.

Auth Server Proxy Config

Proxy Config

Proxy configuration to use for HTTP requests to the authorization server during the OAuth dance. Available in Mule runtime 4.10.0 and later.

**OAuth 2.0 Callback Configuration:**
NameTypeDescriptionDefault ValueRequired

Callback Path

String

Server path to which the user’s browser is redirected to after the OAuth provider successfully authenticates the user. The callback path is typically /callback. This configuration uses your HTTP Listener setup to build the callback path, for example, http://0.0.0.0:{port}/callback.

X

Authorize Path

String

Server path in which the user begins the OAuth dance. The authorize path is typically /authorize.

X

External Callback Url

String

Full, publicly accessible URL on your server in which the user’s browser is redirected to when authorization is successful with the OAuth provider. This field enables you to override the Callback path field, for example, http://my.server.com/callback.

## OAuth 2.0 Flow Overview Anypoint Connectors use the Authorization Code Grant flow for their OAuth 2.0 dance. The following steps show a typical flow for configuring OAuth 2.0 for a connector: 1. In your browser, navigate to the path specified in the **Authorize Path** field to begin the OAuth dance. For example, if you are running the connector on `localhost` and your path is set to `/authorize` with port `8080`, navigate to `http://localhost:8080/authorize`. 2. Provide values for the **Authorization URL**, **Scopes**, **Resource Owner ID**, and **Callback Path** fields. The following conditions must be true for the OAuth provider to accept the authorization request: - The **Authorization URL** is reachable from the user’s browser. - The provided scopes for **Scopes** are supported. - The **Resource Owner ID** (if provided) is registered with the OAuth provider. - The full **Callback Path** is registered with the OAuth provider. 3. Enter your username, password, and other credentials that the OAuth provider accepts, such as 2FA requests. If the authentication is successful, the OAuth provider might ask permission for the app to access your account. This typically occurs the first time you authenticate. 4. Once the OAuth provider authenticates the user and authorizes access to the connector, the user’s web browser is redirected to the callback URL that is registered with the OAuth provider, for example, `http://localhost:8080/callback`. Ensure that the user running the flow has access to the server and endpoint; otherwise, the authorization approval will not reach the connector. You can use `localhost` for testing locally, but you cannot use `localhost` for production environments and cloud deployment. For example, if your connector app is running on `http://my.server.com`, you must specify the **External Callback Url** field with the `http://my.server.com/callback` value. The `http://my.server.com/callback` URL must also be registered with the OAuth provider. 5. Once the user’s browser successfully reaches the callback URL, the connector obtains an authorization code that is automatically exchanged for an access token using the URL configured in the **Access Token URL** field. This token is long-lived and is automatically refreshed by the connector indefinitely (if allowed by the OAuth provider). The connector is now fully authorized and can use any service that accepts the new access token issued by the OAuth provider. ## Example: How to Configure OAuth 2.0 For Gmail Connector The following example shows how to configure OAuth 2.0 for Gmail Connector. ### Configuring the OAuth Provider To configure the OAuth provider for Gmail Connector, you can use Google Cloud Console. The following steps show how to configure the OAuth provider: > [!NOTE] If you haven’t enabled the Gmail API previously, you must create a new project and enable > the Gmail API in the **Enabled APIs & Services** menu section. 1. Add a new client (your connector app) to Google OAuth 2.0. To do so, navigate to **APIs & Services > Credentials > Create Credentials > OAuth Client ID**. 2. Create a new web application by using the **Web Application** field. 3. Enter a name, for example, `OAuthDemoApp`. 4. Add the following URL to the **Authorized redirect URIs** field: `http://127.0.0.1:8080/callback`. 5. Click **Create** and copy the new client ID and client secret for later use. 6. Click **OK**. ### Configuring the Connector Configure the connector with OAuth 2.0 using Anypoint Studio or XML. #### Configuring the Connector Using Anypoint Studio The following steps show how to configure the connector with OAuth 2.0 using Anypoint Studio. 1. In Studio, create a Mule project. 2. In the Mule Palette view, click **(X) Search in Exchange**. 3. In **Add Dependencies to Project**, enter `gmail` in the search field. 4. Click **Gmail Connector - Mule 4** in **Available modules**. 5. Click **Add**. 6. Click **Finish**. 7. Configure the OAuth 2.0 authorization code. Create a new Gmail Connector connection and use the client ID and the client secret from the previous section as your **Consumer Key** and **Consumer Secret** respectively. You can leave the **Resource Owner ID** field empty. > [!NOTE] Gmail Connector comes with pre-filled values for the **Authorization URL**, **Access > Token URL**, and **Scopes** fields, so no further action is required. However, if you are > setting up a different connector that uses a third-party OAuth provider such as Okta or Ping, > you must use their respective **Authorization URL**, **Access Token URL**, and **Scopes** > fields. ![Gmail Connector Configuration window](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-gmail-config.png) 8. Configure the OAuth 2.0 callback configuration. Drag a new **HTTP Listener** to the message flow and set **Protocol** to `HTTP (Default)`, **Host** to `localhost`, and **Port** to `8080`. ![HTTP Listener Configuration window](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-gmail-http-listener.png) 9. Select this **HTTP Listener** in the Gmail Connector connection configuration. 10. Set **Callback path** to `callback` and **Authorize path** to `authorize`. You can leave the **External Callback Url** field empty. ![Gmail OAuth 2.0 Callback Configuration window](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-gmail-callback.png) 11. Run the app. #### Configuring the Connector Using XML The following steps show how to configure the connector with OAuth 2.0 using XML. 1. Add the following dependency into your pom.xml. ```xml com.mulesoft.connectors mule4-gmail-connector 1.0.5 mule-plugin ``` 2. Configure the OAuth 2.0 authorization code. Create a new Gmail Connector connection and use the client ID and the client secret from the previous section as your **Consumer Key** and **Consumer Secret** respectively. You can leave the **Resource Owner ID** field empty. > [!NOTE] Gmail Connector comes with pre-filled values for the **Authorization URL**, **Access > Token URL**, and **Scopes** fields, so no further action is required. However, if you are > setting up a different connector that uses a third-party OAuth provider such as Okta or Ping, > you must use their respective **Authorization URL**, **Access Token URL**, and **Scopes** > fields. ![Gmail Connector Configuration window](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-gmail-config.png) 3. Configure the OAuth 2.0 callback configuration. Create a new **HTTP Listener** configuration and set **Protocol** to `HTTP (Default)`, **Host** to `localhost`, and **Port** to `8080`. Here is the XML for this **HTTP Listener**: ```xml ``` 4. Select this **HTTP Listener** in the Gmail Connector connection configuration. 5. Set **Callback path** to `callback` and **Authorize path** to `authorize`. You can leave the **External Callback Url** field empty. Here is the XML for the OAuth 2.0 callback configuration for Gmail Connector: ```xml ``` 6. Run the app. ### Performing the OAuth Dance Perform the OAuth dance and authorize your app to access your Gmail account via the connector. The following steps show how to perform the OAuth dance: 1. In your browser, navigate to the path specified in the **Authorize Path** field to begin the OAuth dance. In this example, the path is `http://localhost:8080/authorize`. If everything is configured correctly, you will see a Google Authentication screen in which you select your user account and give permission to the app to access your account. Google shows a list of permissions that require approval, for example: ![Window that asks the user permission for Gmail to access their account](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-gmail-permissions.png) > [!NOTE] These permissions are dependent on the **Scopes** field configured in the Gmail > Connector connection configuration. You can accept the defaults, but if you want to limit the > access, you can remove the unwanted scopes. For example, remove the > `https://www.googleapis.com/auth/gmail.send` scope to disallow the connector from sending new > emails from your account, however, doing so limits connector functionality, such as the > ability to use the **Send Message** or **Send Draft** operations. 2. Click **Allow**. The OAuth provider redirects you to `http://127.0.0.1:8080/callback`, which is the redirect URI that you configured in the OAuth provider and is open in the connector configuration. If the OAuth dance is successful, a `Successfully retrieved access token` message shows up on the browser, which means the connector is now fully authorized and ready to use your Gmail account. You do not need to authorize the app again unless you restart Anypoint Studio or the access token expires. Access tokens are automatically refreshed if the refresh token flow is enabled in your OAuth provider. Google supports this automatically, so your tokens are refreshed indefinitely. > [!NOTE] If you want your authorization to persist over restarts, you can configure an object > store in the Gmail Connector connection configuration. ### Testing the Connector Now that your connector is functional and authorized, you can test a flow using the connector. The following steps show how to retrieve some of your emails: 1. Drag an **HTTP Listener** to the flow. Set **Path** to `/messages`. 2. Drag the **List Messages** operation to the flow. The only required field is **User Id**, which contains the user’s email address that you want to access. For example, this is useful for corporate email servers with multiple users registered under one company account. Set **User Id** to `me` to retrieve emails from your main account directly. You can also set **Max Results** to a lower number if you want. 3. Restart the project. 4. Navigate to `http://localhost:8080/messages`. You should see a JSON formatted list of message IDs and thread IDs. You can retrieve the details of these messages or threads using the **Get Message** or the **Get Thread** operations. #### XML for this Example Paste this code into the Studio XML editor to quickly load the flow for this testing example into your Mule app: ```xml ``` ## See Also - [Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub) - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Configuring OAuth 2.0 for Connectors on CloudHub > For the full documentation index, see: https://docs.mulesoft.com/llms.txt You can deploy your OAuth 2.0 enabled connectors to a cloud service. Configuring OAuth 2.0 for a connector on CloudHub is the same as configuring OAuth 2.0 for a connector locally, except with CloudHub, the Mule implementation is behind an extra server. Consider the following when configuring OAuth 2.0 for a connector on CloudHub: - Connector Listener - CloudHub manages some [properties](https://docs.mulesoft.com/cloudhub/cloudhub-manage-props#cloudhub-reserved-properties) for you automatically, such as `${http.port}` and `${https.port}`. Use these properties when configuring your **HTTP Listener**. ![Http Listener configuration window for CloudHub example](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-cloudhub-img1.png) - When deployed on the cloud, the `localhost`, `0.0.0.0`, and `127.0.0.1` hosts are no longer publicly reachable. When configuring your OAuth provider, you must replace all links containing these hosts with the actual CloudHub-provided public addresses. For CloudHub, this address is in the format `{ch-app-name}.{region}.cloudhub.io`. For example, an HTTP app named `ch-example-app` deployed in the Europe (London) [region](https://docs.mulesoft.com/cloudhub/cloudhub-networking-guide#regional-services) has public address of `http://ch-example-app.uk-e1.cloudhub.io`. - OAuth Provider Setup - If you set **Callback Path** to `/callback`, your public callback URL is `{ch-app-name}.{region}.cloudhub.io/callback`. This is the callback URL to use as your redirect URI when you configure your OAuth provider. ![OKTA Example](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-cloudhub-idp-example.png) This must also be configured in your connector as the **External Callback Url**. You can use the `${fullDomain}` property that CloudHub configures for you to automatically obtain the proper host name. ![External Callback Url field configuration window](/mulesoft/current/en-us/connectors/_images/intro-config-oauth2-cloudhub-callback-config.png) > [!NOTE] If you are deploying to multiple regions or have some other gateway configured, use > the hostname of the load balancer or the gateway in your OAuth provider callback URL and in > **External Callback Url**. > > If your Salesforce instance doesn’t support HTTP or HTTPS callback URLs with private cloud > URLs, you can update the callback URL to use a public endpoint. In OAuth 2.0 configuration, the user (not the OAuth provider) reaches the callback endpoint from their browser. Ensure that your region configuration is correct. If you create your CloudHub app in the US region and your users connect to the app from Europe, the request is blocked by the gateway. ## Performing the OAuth Dance After you complete the OAuth 2.0 configuration, you can deploy your app to CloudHub and initialize the OAuth dance by navigating to your public hostname on your authorization endpoint. For example, with the previous configuration, you can navigate to `{ch-app-name}.{region}.cloudhub.io/authorize`. This starts the OAuth dance and prompts you to log in with your OAuth provider. ## See Also - [Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2) - [Deploying to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub) - [Salesforce Help](https://help.salesforce.com) [![Salesforce Logo](/mulesoft/current/en-us/_/img/logos/salesforce.png) Salesforce Enables you to connect to the Salesforce SOAP API, REST API, Bulk API, and Streaming API, depending on the operation you configure. ](../salesforce-connector/latest/)[![SAP Logo](/mulesoft/current/en-us/_/img/logos/sap.png) SAP Enables the integration of data to and from external systems based on SAP NetWeaver. ](../sap-connector/latest/)[![Amazon Logo](/mulesoft/current/en-us/_/img/logos/amazon.png) Amazon Provides connectivity to the Amazon S3 API, enabling you to interface with Amazon S3 to store objects, download and use data with other AWS services, and build applications that require internet storage. ](../amazon-s3-connector/latest/) [![NetSuite](/mulesoft/current/en-us/_/img/logos/netsuite.png) NetSuite](../netsuite-connector/latest/)[![Workday](/mulesoft/current/en-us/_/img/logos/workday.png) Workday ](../workday-connector/latest/)[![Microsoft Dynamics 365](/mulesoft/current/en-us/_/img/logos/microsoft-dynamics-365.png) Microsoft Dynamics 365 ](../microsoft-dynamics-365-connector/latest/)[![Apache Kafka](/mulesoft/current/en-us/_/img/logos/kafka.png) Apache Kafka ](../kafka-connector/latest/)[![ServiceNow](/mulesoft/current/en-us/_/img/logos/servicenow.png) ServiceNow ](../servicenow-connector/latest/)[![MongoDB](/mulesoft/current/en-us/_/img/logos/mongodb.png) MongoDB ](../mongodb-connector/latest/)[![Box](/mulesoft/current/en-us/_/img/logos/box.png) Box ](../box-connector/latest/)[![Redis](/mulesoft/current/en-us/_/img/logos/redis.png) Redis](../redis-connector/latest/)
--- product: Connectors --- # Use Anypoint Exchange to Discover Connectors, Templates, and Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Use Anypoint Exchange to discover integration assets such as connectors, templates, and examples and import them into your app or project. You can browse and search for assets created by MuleSoft, assets available on your own organization’s Exchange portal, or assets created by partners and the community. To access assets in MuleSoft’s Exchange portal, do either of the following: - Go to [https://www.mulesoft.com/exchange/](https://www.mulesoft.com/exchange/). - Go to your organization’s Exchange and click the **Provided by MuleSoft** link in the left navigation panel. To access assets on your own organization’s Exchange portal, you must have access rights to that Exchange. For more information about searching for assets in Exchange, see [Find Asset Information](https://docs.mulesoft.com/exchange/to-find-info). ## Discover and Add Connectors to Studio Projects Discover connectors either by starting the search in Exchange or by accessing Exchange from within an Anypoint Studio project: - Start in Exchange to view a list of all or a subset of MuleSoft-provided connectors. From there, you can download the connector to Studio. - Access Exchange from within a Studio project to locate a template applicable to your use case. ### Discover Connectors Provided by MuleSoft To use Exchange as a starting point for discovering all or a subset of MuleSoft-provided connectors: 1. [Access Exchange](https://www.mulesoft.com/exchange/). 2. Under **All assets** on the left side of the screen, click **Provided by MuleSoft**. 3. Select **Connectors** in the drop-down list to the left of the search bar. 4. To filter the list of connectors, add text to the search field. For example, if you enter `Salesforce`, the search returns all Salesforce connectors. 5. Click on a connector to view its details. ### Import a Connector into a Studio Project To import a connector into a Studio project: 1. In Studio, create a Mule project. 2. In the Mule Palette view, click **(X) Search in Exchange**. 3. In **Add Dependencies to Project**, type the connector name in the search field. 4. Click the connector name in **Available modules**. 5. Click **Add**. 6. Click **Finish**. ### Next Step Follow the directions in the connector’s User Guide for configuring the connector in Studio. ## Discover and Add Templates to Studio A template is a pre-built project that you can use as a starting point for applicable use cases. Many templates include one or more connector configurations. Discover templates by starting in Exchange or by accessing Exchange from within Studio: - Start in Exchange to view a list of all or a subset of MuleSoft-provided templates. From there, you can download the template to Studio. - Access Exchange from within Studio to locate a template that fits your use case. When you locate a template in Exchange, the landing page of the associated connector contains: - An overview of what the template does - Prerequisites for using the template - Instructions for configuring the template ### Discover MuleSoft Templates To use Exchange as a starting point for discovering MuleSoft-provided templates: 1. [Log in to Exchange](https://www.mulesoft.com/exchange/). 2. Under **All assets** on the left side of the screen, click **Provided by MuleSoft**. 3. Select **Templates** in the drop-down list to the left of the search bar. 4. To filter the list of templates, add text to the search field. For example, if you enter `Salesforce template`, the search returns all templates that use Salesforce Connector. 5. Click on a template to view its details. All templates can be downloaded to Studio by clicking **Download** on the upper-right of the screen. You must be logged in to Anypoint Platform to download a template. The system downloads the template as a `.jar` file. ### Import a Downloaded Template to Studio If you downloaded a template from Exchange, you can import the downloaded `.jar` file to Studio: 1. From Studio, select **File > Import**. 2. In the Import wizard, expand the **Anypoint Studio** folder. 3. Select **Packaged mule application (.jar)** and click **Next**. 4. In the **File** field, optionally enter a name for the file. 5. Click the ellipses (…​) button. 6. Select the `.jar` file to import. 7. Click **Open**. Studio imports the template as a new Studio project. ### Add a Template Directly to Studio When you are working in Studio, you can import a template directly from Exchange: 1. From Studio, click the Exchange icon **(X)** in the upper-left of the Studio taskbar. 2. Log in to Exchange using your Anypoint Platform username and password. 3. Search for the template either directly or by accessing the template link on the landing page of the associated connector. 4. Select the template and click **Open**. Studio imports the template as a new Studio project. ### Next Step Follow the instructions on the template’s landing page in Exchange to use the template. ## Discover and Add Examples to Studio An example is a Studio project that demonstrates how to handle a use case or solution. Many examples include one or more connector configurations. After you locate an example, you can import it to Studio and then run it. Discover examples by starting in Exchange or by accessing Exchange from within a Studio project: - Start in Exchange to view a list of all or a subset of MuleSoft-provided examples. From there, you can view download an example to Studio. - Access Exchange from Studio to locate an example that fits your project’s use case. When you locate an example in Exchange, the landing page explains how to set up and run the example. ### Discover MuleSoft Examples To use Exchange as a starting point for discovering MuleSoft-provided examples: 1. Log in to Exchange with your Anypoint username and password. 2. Under **All assets** on the left side of the screen, click **Provided by MuleSoft**. 3. Select **Examples** in the drop-down list to the left of the search bar. 4. To narrow the list of examples, enter applicable text in the Search field. For example, if you enter `Salesforce Connector`, the search returns all examples that use the Salesforce Connector. 5. Click on an example to view its details. 6. To download the example for use in Studio, click **Download** on the upper right of the screen. The system downloads the file as a `.jar` file. ### Import a Downloaded Example to Studio If you downloaded an example from Exchange, you can import the downloaded `.jar` file to Studio to create the new project: 1. From Studio, select **File > Import**. 2. In the Import wizard, expand the **Anypoint Studio** folder. 3. Select **Packaged mule application (.jar)** and click **Next**. 4. In the **File** field, optionally enter a name for the file. 5. Click the ellipses (…​) button. 6. Select the `.jar` file to import. 7. Click **Open**. Studio imports the example as a new Studio project. ### Add an Example Directly to Studio When you are working in Studio, you can import an example directly from Exchange: 1. From Studio, click the Exchange icon **(X)** in the upper-left of the Studio taskbar. 2. Log in to Exchange using your Anypoint Platform username and password. 3. Search for the example. 4. Select the example and click **Open**. Studio imports the example as a new Studio project. ### Next Step Follow the instructions on the example’s landing page in Exchange to set up and run the example. ## See Also - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Use XML to Configure a Connector > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio: - If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for a Connector To add a namespace for a connector, paste the following code inside the `` tag of the header of your configuration XML, where `` is the connector name specified in the XML and Maven Support topic of the connector’s User Guide: ```xml http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ="http://www.mulesoft.org/schema/mule/" xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd"> ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml GROUP_ID_FROM_EXCHANGE ARTIFACT_ID_FROM_EXCHANGE x.x.x mule-plugin ``` Replace `GROUP_ID_FROM_EXCHANGE` and `ARTIFACT_ID_FROM_EXCHANGE` with correct information from Exchange. Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for ``. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Using Anypoint Code Builder to Configure a Connector > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To use Anypoint Code Builder to configure a connector: - [Create a basic integration project](#create-integration-project) in Anypoint Code Builder. - [Add connectors](#add-connector-to-project) and other components to your Mule application to process your business logic. - [Configure the connector’s trigger](#configure-trigger). - [Configure the connector’s operations](#configure-component-attributes). ## Before You Begin Before creating an integration project, you must: - [Set up and access the Anypoint Code Builder web or desktop IDE.](https://docs.mulesoft.com/anypoint-code-builder/start-acb) - Have credentials to access the connector’s API. To use connectors, you must be familiar with: - The connector’s API - Anypoint Connectors - Mule runtime engine (Mule) After you complete the prerequisites, you are ready to create an app and configure the connector by using Anypoint Code Builder. ## Create a New Integration Project 1. In the activity bar of the IDE, click the ![Anypoint Code Builder icon](/mulesoft/current/en-us/connectors/_images/acb-icon-ms-logo.png) (**Anypoint Code Builder**) icon. 2. From **Quick Actions**, click **Develop an Integration**: ![Develop an Integration link highlighted in the Getting started section](/mulesoft/current/en-us/anypoint-code-builder/_images/develop-integration-option-mat.png) 3. Complete the **Develop an Integration** form.
AttributeValue

Project Name

Unique name for your project.

This name is used as the title and name of the integration project file. For example, if the project name is "Salesforce Integration," the project file name is salesforce-integration.

Project Location

Your home directory or another directory you create. Click Browse to select a different directory for the integration project.

Don’t create the project within another project directory.

4. Click **Create Project**. ## Add the Connector to Your Integration Project Anypoint Connectors provide operations for retrieving, modifying, and sending data to and from systems. In addition to the [built-in connectors](https://docs.mulesoft.com/anypoint-code-builder/acb-reference#builtin-connectors) that Anypoint Code Builder provides, you can download many other connectors from Anypoint Exchange. To import a connector from Exchange and add it to your configuration: 1. In the Explorer view, open the configuration XML file for your project, such as `my-project-name.xml`. 2. Click the ![Show Mule graphical mode icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-tree-view.png) (**Show Mule graphical mode**) icon in the activity bar to open the canvas UI if it doesn’t open automatically. 3. Add the connector the same way you added other components from the canvas UI: 1. In the canvas UI, click the ![Add Component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 2. In the **Add Component** panel, click **Connectors**. 3. Click the connector name and then click the operation to add, such as **Publish**: ![Add Publish operation from the Anypoint MQ Connector](/mulesoft/current/en-us/anypoint-code-builder/_images/int-add-connector-operation.png) If the connector isn’t available locally, click the ![Search in Exchange icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-search-exchange.png) (**Search in Exchange**) toggle: ![Search in Exchange toggle](/mulesoft/current/en-us/anypoint-code-builder/_images/int-connector-search-exchange.png)
1Search locally
2Search in Exchange
4. Select the connector to add to your project. 5. Select the operation from the **Add Component** panel. Adding a connector to an integration project does not make that connector available to other projects in your Anypoint Code Builder workspace. ## Update the Connector Version To update a connector to a newer version in Anypoint Code Builder, see [Select Connector Versions for a Project](https://docs.mulesoft.com/anypoint-code-builder/int-versions#project-versions-connectors). Updating to a new major version (for example, from `1.x` to `2.x`) can introduce backward-compatibility changes. Before you upgrade, review the release notes and, if available, the upgrade and migration guide for the connector. ## Creating a Configuration File A configuration file is a YAML file that references other configurations and specifies values for your connector’s properties. Define the configuration properties based on the environment that you are deploying your application to. 1. In the **Explorer** view, right-click the **resources** folder (`src/main/resources`) and select **New File**. 2. Name the file `config.yaml`. 3. Populate your file with the connection properties required to connect to your connector. The following shows examples of Salesforce, Gmail, and Slack connection properties: ```YAML salesforce: username: "yourUserName" password: "yourPassword" token: "yourToken" email: host: "smtp.gmail.com" username: "yourGmailEmail" password: "yourEmailAppPassword" slack: token: "yourSlackToken" ``` 4. Navigate to your project XML, add a new line before the `
` tag, type `configuration`, and select **mule:configurationProperties**: ![List of components with an arrow pointing to the mule:configurationProperties component](/mulesoft/current/en-us/anypoint-code-builder/_images/select-mule-config-properties-contacts-sync.png) 5. Scroll through the attributes and set the value of `file` to `config.yaml`: ```XML ``` ### Salesforce Connector Configuration Example Use the values in your `config.yaml` file to connect Salesforce Connector to your Salesforce environment: 1. In your project XML file, create a new line after the `` element, type `salesforce`, and select **salesforce:sfdc-config**. 2. Set the **name** field to `Salesforce-Config`. 3. Create a new line, type `basic`, and select **Salesforce:Basic**. 4. Configure the `username` and `password` properties to use your configuration file values: ```XML ``` > [!NOTE] When you move your cursor over the `${salesforce.username}` and > `${salesforce.password}` elements, Anypoint Code Builder shows the values from the > configuration file. 5. Click **Test Connection** for the `` element to verify your connection to Salesforce: ![Arrow pointing to the Test Connection option in the connection XML](/mulesoft/current/en-us/anypoint-code-builder/_images/sync-api-sfdc-test-connection.png) Anypoint Code Builder returns a **Connection is valid** message. If you get an error, check the error message to troubleshoot further. For more information, see [Troubleshooting Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/troubleshooting). ## Configuring a Trigger for the Flow A trigger (source) starts the flow when specified conditions are met. If a connector has its own associated sources, you can use a connector-specific trigger to initiate the flow. Each connector trigger has a unique configuration. ### Configuring HTTP Listener To use HTTP Listener as a trigger for the flow: 1. Click the **Listener** component on the canvas. 2. (Optional) Click the edit icon to change the name of the **Listener** component. 3. (Optional) If you created a configuration file for the connector, select it. 4. In the **General** tab, in the **Path** field, enter the relative path for the path set in the HTTP configuration element. See [Configure Paths](https://docs.mulesoft.com/http-connector/latest/http-listener-ref#configure-paths). 5. Select the **Advanced** tab to configure the following attributes:
AttributeDescriptionRequired

Allowed methods

To allow all HTTP methods (default), do not define this attribute. To restrict specific methods, specify the allowed HTTP methods in a comma-separated format, for example, POST,GET.

No

Response streaming mode

Whether to use streaming when the response is sent. When HTTP Connector manages response bodies, the connector considers the type of data to send and uses chunked encoding when the body size isn’t clear. This causes streams with no size information. To control this behavior, select any of these options:

  • AUTO (default)
    Uses Content-Length encoding if a size is defined for the body, otherwise uses Transfer-Encoding: chunked.

  • ALWAYS
    Uses Transfer-Encoding: chunked regardless of any size data present.

  • NEVER
    Uses Content-Length encoding, consuming streams if necessary to determine the data size.

No

Output MIME type

MIME type of the payload that this component outputs.

No

Parameters

Appends a key-value pair for a reader property to the value of the Output MIME attribute. Multiple key-value pairs are allowed.

No

Output encoding

Encoding of the payload that this component outputs.

No

Streaming Strategy

For more information about configuring the streaming strategy, see Configuring the Streaming Strategy in XML.

No

Primary node only

If selected, executes the Listener trigger on the primary node only when the app is running in a cluster.

No

Redelivery policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow. For more information about configuring the redelivery policy, see Redelivery Policy.

No

Reconnection strategy

When an operation in a Mule application fails to connect to an external server, the default behavior is for the operation to fail immediately and return a connectivity error. You can modify the default behavior by configuring the reconnection strategy for the operation. See Reconnect, Reconnect Forever, and Configuring the Reconnection Strategy in XML.

No

Response

Attributes that contain the metadata associated with the body (or payload) of the message. For more information, see HTTP Response Attributes.

No

Error Response

If selected, the HTTP error response returns a status code for the error.

No

Body

Body of the error message.

No

Headers

Headers to include in the error message. Each header attribute is a key-value pair separated by an equal sign (=), for example:

Headers=[
          date=Sun, 20 Jan 2019 19:13:51 GMT
          content-type=text/html;
          charset=UTF-8
          transfer-encoding=chunked
          connection=keep-alive
          set-cookie=__cfduid=d03462713a0b2c57c8d2ad3bf311287041548011631;
          expires=Mon, 20-Jan-20 19:13:51 GMT;
          path=/;
          domain=.typicode.com;
          HttpOnly
          x-powered-by=Express
          vary=Origin, Accept-Encoding
          access-control-allow-credentials=true
          cache-control=public, max-age=14400
          last-modified=Tue, 15 Jan 2019 18:17:15 GMT
          via=1.1 vegur
          cf-cache-status=HIT
          expires=Sun, 20 Jan 2019 23:13:51 GMT
          expect-ct=max-age=604800,
          report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
          server=cloudflare
          cf-ray=49c3dc570c2f281c-SJC
       ]

No

Status code

Status code of the error response, for example, Status Code=500.

No

Reason phrase

Reason for the error, for example, Gateway Timeout or Internal Server Error.

No

For details about the Listener configuration attributes, see [Listener Configuration](https://docs.mulesoft.com/http-connector/latest/http-documentation#listenerConfig). ### Configuring Scheduler The Scheduler sets a scheduling strategy at a fixed frequency or an interval based on a cron expression. When adding a Scheduler to your Mule application, consider these points: - Schedulers use the same timezone as the machine on which Mule is running. However, if an application is running in CloudHub, the Scheduler conforms to the UTC timezone, regardless of the geographic region in which the application is running. To set a different time zone for the Scheduler, see `timeZone` in the [cron scheduling strategy attributes](#cron-attributes). - The `disallowConcurrentExecution` property enables you to prevent the Scheduler from triggering the execution of the flow while a previously-triggered execution is running. - If [back-pressure](https://docs.mulesoft.com/mule-runtime/latest/execution-engine#backpressure) occurs because no resources are available at the time of the scheduled trigger, Mule skips that execution. - In a Mule runtime engine cluster or multi-worker CloudHub deployment, the Scheduler executes only on the primary node (that is, only in one Mule instance). ```xml ``` Scheduler (``) attributes are configurable through the UI and XML.
Attribute NameAttribute XMLDescription

Scheduler (default)

doc:name

Editable name for the component to display in the canvas.

N/A

doc:id

Automatically generated identifier for the component.

Disallow concurrent execution

disallowConcurrentExecution

When this attribute is set to true, the Scheduler skips its scheduled execution if a previous execution is still running. Once the flow finishes, the Scheduler executes at the next configured interval. The default value is false.

**Scheduling strategy** (``) is a child element of Scheduler.
Child ElementDescription

<scheduling-strategy/>

Accepts a <fixed-frequency/> or <cron/> configuration.

### Fixed Frequency Attributes Scheduler accepts a fixed frequency (``) element that accepts these attributes:
Attribute NameAttribute XMLDescription

N/A

frequency

The frequency at which the Scheduler triggers the flow given the timeUnit setting. Defaults to 1000.

N/A

startDelay

The amount of time to delay execution of the Scheduler for the first time after the application starts. This property uses the same timeUnit as the frequency. Defaults to 0.

N/A

timeUnit

One of the following time units for the values of frequency and startDelay: MILLISECONDS, SECONDS, MINUTES, HOURS, or DAYS. Defaults to MILLISECONDS.

See the [fixed frequency examples](#example1). ### Cron Attributes For more complex scheduling, configure a cron expression in the `` element.
Attribute NameAttribute XMLDescription

N/A

expression

A cron expression for triggering the Scheduler. There is no default cron expression. For guidance with expressions, see Cron Expressions. Example: expression="1 1 1 1,7 * ?".

N/A

timeZone

Time zone passed as a system property, or in a machine’s operating system. Java time zone values are supported. Avoid Java abbreviations, such as PST and AGT, and instead use the full-name Java equivalents, such as America/Los_Angeles. Example: timeZone="America/Argentina/Buenos_Aires".

See the [cron examples](#example2). ### Fixed Frequency Examples In the following example, the Scheduler executes every fifteen seconds: ```xml ``` In the following example, the Scheduler skips its execution if the flow takes longer to complete than the fixed frequency of 10 milliseconds: ```xml ``` Each time a Scheduler skips its execution, Mule logs an `Execution skipped` message, for example (edited for readability): ```logs INFO 2022-11-09 15:15:43,082 ... ...scheduler.DefaultSchedulerMessageSource: Flow 'scheduler-disallowConcurrentExecution-ex' is already running and 'disallowConcurrentExecution' is set to 'true'. Execution skipped. INFO 2022-11-09 15:15:43,083 ... ...scheduler.DefaultSchedulerMessageSource: Flow 'scheduler-disallowConcurrentExecution-ex' is already running and 'disallowConcurrentExecution' is set to 'true'. Execution skipped. ``` The following example shows a fixed-frequency scheduling strategy that executes the Scheduler every 10 seconds after an initial 10 second delay: ```xml ``` ### Cron Examples The following example uses a cron expression to trigger the generation of a Mule message in a new execution of the flow every fifteen seconds: ```xml ``` The following example uses a cron expression to trigger the flow at 12:00 every day in the `America/Los_Angeles` time zone. ```xml ``` ## Cron Expressions Cron is a widely used standard for describing time and date information. The Cron Expression (`` scheduling strategy (``) is useful for triggering a flow at intervals not available through the Fixed Frequency scheduling strategy. The Scheduler keeps track of every second and creates a Mule event when the Quartz Cron expression matches your time-date setting. You can trigger the event just once or at regular intervals. A date-time expression consists of six required settings and can include the optional year setting. Specify the settings in the following order: 1. Seconds (`0`\-`59`) 2. Minutes (`0`\-`59`) 3. Hours (`0`\-`23`) 4. Day of month (`1`\-`31`) 5. Month (`1`\-`12` or `JAN`\-`DEC`) 6. Day of the week (`1`\-`7` or `SUN`\-`SAT`) 7. Year (empty or a 4-digit year between `1970`\-`2099`, for example, `2019`) The Scheduler supports Quartz Cron expressions. Here are a few examples:
ExpressionBehavior

1/2 * * * * ?

Run every 2 seconds of the day, every day.

0 15 10 ? * *

Run at 10:15 a.m., every day. 0 15 10 * * ? * and 0 15 10 * * ? produce the same effect.

0 15 10 * * ? 2019

Run at 10:15 a.m., every day during the year 2019.

0 * 14 * * ?

Run every minute starting at 2pm and ending at 2:59pm, every day.

0 0/5 14 * * ?

Run every 5 minutes starting at 2pm and ending at 2:55pm, every day

1 1 1 1,7 * ?

Run the first second of the first minute of the first hour, on the first and seventh day, every month.

The Scheduler component also supports Quartz Scheduler special characters: - `*`: All values. - `?`: No specific value. - `-`: Range of values, for example, `1-3`. - `,`: Additional values, for example, `1,7`. - `/`: Incremental values, for example, `1/7`. - `L`: Last day of the week or month, or last specific day of the month (such as `6L` for the last Saturday of the month). - `W`: Weekday, which is valid in the month and day-of-the-week fields. - `#`: "nth" day of the month. For example, `#3` is the third day of the month. This example logs the message "hello" every second: ```XML ``` Note that there are many free online tools that can help you build Cron expressions. ### Using a Connector-Specific Trigger If a connector has associated triggers, you can use a connector-specific trigger to initiate the flow. Each connector trigger has a unique configuration. For example, you can configure one of these triggers to use with Salesforce Connector: - **On Deleted Object** Initiates your app when a Salesforce user deletes an object. Possible object types are `Contact`, `Lead`, `Account`, `Contracts`, `Opportunity`, or the name of a custom object. - **On Modified Object** Initiates your app when a Salesforce user modifies an object. Possible object types are `Contact`, `Lead`, `Account`, `Contracts`, `Opportunity`, or the name of a custom object. - **On New Object** Initiates your app when a Salesforce user creates a new object. Possible object types are `Contact`, `Lead`, `Account`, `Contracts`, `Opportunity`, or the name of a custom object. - **Replay channel listener** Subscribes to a streaming channel. This source provides channel-related notification settings for new events and events stored by Salesforce within the 24-hour retention period. Events that occur in the specified channel source trigger the flow. - **Replay topic listener** Subscribes to a topic. This source provides topic-related notification settings for new events and events stored by Salesforce within the 24-hour retention period. Events that occur on records in the specified topic trigger the flow. - **Subscribe channel listener** Subscribes to a streaming channel. This source provides channel-related notification settings for new events that occur after you subscribe. - **Subscribe topic listener** Subscribes to a topic. This source provides topic-related notification settings for new events that occur after you subscribe. > [!NOTE] A channel or topic must be published to Salesforce before a subscription to the channel > can be created. For example, to configure the **On New Object** source: 1. Add the **On New Object** component to the canvas. 2. Click the **On New Object** component on the canvas. 3. In the **General** tab, select the configuration file to use, and configure the following attributes:
AttributeDescriptionRequired

Object type

Salesforce object type.

Yes

Triggers query

Query that filters the trigger results, for example, Name='Filter'.

No

Since

Date in the YYYY-MM-DD hh:mm:ss format, for example, 2017-03-17 16:30:40. If this field is empty, this source retrieves the selected objects from the time the Mule app started.

No

Scheduling strategy

Triggers the flow’s execution based on a time-based condition. See Configuring Scheduler.

Yes

4. Select the **Advanced** tab to configure the following attributes:
AttributeDescriptionRequired

Primary node only

Executes the On New Object trigger only on the primary node when the app is running in a cluster if selected.

No

Redelivery policy

For more information, see Redelivery Policy

No

Read timeout

How long the consumer waits for a response before it times out.

No

Time unit

Time unit for the Read timeout attribute. Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

No

Reconnection strategy

See Reconnect and Reconnect Forever, and Configuring the Reconnection Strategy in XML.

No

## Configure the Component Attributes After you add components to your integration project, configure the attributes in the component UI, or configure the attributes directly in the XML code editor. Connector XML tags start with a namespace followed by an operation, following the syntax `namespace:operation`, such as `` for a **Select** operation in Anypoint Connector for Database (Database Connector). ## Configuring a Connector in XML Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Code Builder: - If you manually code a Mule runtime engine (Mule) app in XML from the Anypoint Code Builder XML editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Anypoint Code Builder, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. This example shows how the namespace statements are placed in the `` XML block: ```xml ``` The Apache Maven `pom.xml` file generated by Anypoint Code Builder contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml {group-id-exchange} {artifact-id-exchange} x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for the connector. 4. Select the connector. 5. Click **Dependency Snippets**. ### Configuring the Streaming Strategy in XML You can configure how Mule handles streams with streaming strategies. ### File-Stored Repeatable Stream The following is an XML example of reading a file that is configured with a 1 MB buffer: ```xml ``` If you consistently process a file that’s no larger than 10 KB, you can save memory by reducing the `inMemorySize` attribute: ```xml ``` ### In-Memory Repeatable Stream The following XML example shows an in-memory repeatable stream with a 512 KB initial size, which grows at a rate of 256 KB and allows up to 2000 KB (2 MB) of content in memory: ```xml ``` ## Configuring the Reconnection Strategy in XML The following is an XML example of a standard reconnection strategy setting the count of reconnection attempts before failing to `5` and setting `failsDeployment` to true, which causes the application deployment to fail if the connection test fails. Because a frequency is not specified, the retry interval is the default of every 2000 ms: ```xml ``` The following is an XML example of a reconnect forever strategy where the connector attempts to reconnect every 4000 ms for as long as the application runs: ```xml ``` ## See Also - [Anypoint Code Builder Overview](https://docs.mulesoft.com/anypoint-code-builder/) - [Creating Integrations](https://docs.mulesoft.com/anypoint-code-builder/int-create-integrations) - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Anypoint Code Builder Components and Commands Reference](https://docs.mulesoft.com/anypoint-code-builder/acb-reference) - [Defining and Securing Properties for a Mule Application](https://docs.mulesoft.com/anypoint-code-builder/int-create-secure-configs) - [Triggering Flows in Your Development Environment](https://docs.mulesoft.com/anypoint-code-builder/int-trigger-flows) - [Configuring Components](https://docs.mulesoft.com/anypoint-code-builder/int-configure-components) - [Debugging Mule Applications](https://docs.mulesoft.com/anypoint-code-builder/int-debug-mule-apps) - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Using Anypoint Studio to Configure a Connector > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To use Anypoint Studio to configure a connector: 1. Supply your authentication credentials to Anypoint Platform. 2. Install the connector. 3. Configure a source for the connector’s flow. 4. Configure the connector. Follow these best practices when you configure a source and connector in Studio: - Configure an associated global element for the source and connector. - Create a YAML file or properties file to contain your properties, and then reference the file from the configuration. - Configure a reconnection strategy for the source and target connector. For information about these best practices, see [Best Practices for Configuring Connectors](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview#best-practices). ## Supply Authentication Credentials to the Anypoint Platform To access connectors on the Anypoint Exchange portal, you must first configure Anypoint Platform credentials if these have not been configured: - If you use the US cloud, see [Configuring Anypoint Platform Credentials (Anypoint Studio)](https://docs.mulesoft.com/studio/set-credentials-in-studio-to) for information. - If you use the EU cloud or Anypoint Private Cloud Edition (Anypoint PCE), see [Configure Private Cloud Edition in Studio](https://docs.mulesoft.com/studio/pce-configuration) for information. ## Add the Connector to Your Mule Project Installing a connector adds it to a Mule project: 1. In Studio, create a Mule project. 2. In the Mule Palette view, click **(X) Search in Exchange**. 3. In **Add Dependencies to Project**, enter the connector name in the search field. 4. Click the connector name in **Available modules**. 5. Click **Add**. 6. Click **Finish**. ## Update the Connector Version To update a connector to a newer version in Anypoint Studio, see [Update Mule Modules in Anypoint Studio](https://docs.mulesoft.com/studio/update-modules). Updating to a new major version (for example, from `1.x` to `2.x`) can introduce backward-compatibility changes. Before you upgrade, review the release notes and, if available, the upgrade and migration guide for the connector. ## Configure a Source for the Connector A source initiates a flow when a specified condition is met. Configure a source for the connector’s flow, such as an HTTP Listener operation (HTTP Listener), Scheduler endpoint (Scheduler), or connector-specific source. ### Use HTTP Listener as a Source HTTP Listener listens for HTTP requests and triggers the associated flow when it receives them. To use HTTP Listener as a source: 1. In the Mule Palette view, search for **HTTP** and select the **Listener** operation: ![Selecting HTTP Listener as a source](/mulesoft/current/en-us/connectors/_images/intro-config-studio-select-listener.png) Figure 1. Select HTTP Listener to listen for HTTP requests 2. Drag the **Listener** operation onto the canvas. 3. In the **Listener** configuration screen, click the plus sign (**+**) next to the **Connector configuration** field to add a global element for HTTP Listener. The following screenshot shows the default values on the **General** tab for the HTTP Listener global element: ![HTTP Listener global element default values](/mulesoft/current/en-us/connectors/_images/intro-config-studio-listener.png) Figure 2. Default values for the HTTP Listener global element - The first section shows the default values for the protocol, host, and port to use in the connection. - The second section shows the default values for the base path and listener interceptors to use in the connection. 4. Accept the defaults on the **General** tab or specify required information: - To listen on a specific port for every network interface on the server, leave the default value `0.0.0.0` for the **Host** property. - To listen for incoming requests generated inside the server, set the **Port** value to `localhost`. 5. To use TLS, click the **TLS** tab and specify the required information. 6. On the **Advanced** tab, specify a reconnection strategy. For information, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview#reconnection-strategy). 7. Click **Test Connection** to confirm that Mule can connect with the specified server. 8. Click **OK**. 9. Set the **Path** field to the appropriate path. 10. Select the other tabs and specify the appropriate field values. For more information about HTTP Listener, see the [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation). ### Use Scheduler as a Source Use Scheduler to initiate a flow when a time-based condition is met. You can configure Scheduler to initiate a flow at a regular interval or you can use a more flexible cron expression. For example, you can use Scheduler to initiate a flow every five seconds, or you can set up a cron expression to initiate a flow at noon every day for one month. To use Scheduler as a source: 1. In the **Mule Palette** view, search for and select **Scheduler**: ![Selecting Scheduler as a source](/mulesoft/current/en-us/connectors/_images/intro-config-studio-select-scheduler.png) Figure 3. Select Scheduler to schedule when a flow is initiated 2. Drag **Scheduler** onto the canvas. This screenshot shows the default values for the scheduling strategy: ![Default values for the scheduling strategy](/mulesoft/current/en-us/connectors/_images/intro-config-studio-scheduler.png) 3. In the **Scheduling Strategy** field of the **Scheduler configuration** screen, select whether you want to use a fixed frequency or cron expression to initiate the flow: - If you select **Fixed Frequency**, enter values for these fields: - **Frequency** The frequency at which the Scheduler initiates the flow, based on the time unit specified in the **Time unit** field - **Start delay** The amount of time to wait before initiating the flow for the first time after the app starts, based on the time unit specified in the **Time unit** field - **Time unit** The time unit for the values of **Frequency** and **Start Delay** - If you select **Cron**, enter the cron expression in the **Expression** field and the time zone in the **Time Zone** field. For the format and valid values for the **Time Zone** field, see the Javadoc for the Java TimeZone class. 4. To configure metadata for the payload, variables, and attributes, select the **Metadata** tab and add the appropriate metadata. For more information about Scheduler, see [Scheduler Endpoint](https://docs.mulesoft.com/mule-runtime/latest/scheduler-concept). ### Use a Connector-Specific Source If a connector has associated sources, you can use a connector-specific source to initiate the flow. Each connector source has a unique configuration. For example, you can use Amazon SQS Receive Messages as a source for Amazon SQS Connector. This source initiates a flow each time the specified Amazon SQS queue receives a new message. To configure a connector-specific source: 1. In the **Mule Palette** view, search for the connector and select the source. For example, search for **Amazon SQS** and select the **Receive Messages** source: ![Amazon SQS Receive Messages source](/mulesoft/current/en-us/connectors/_images/intro-config-studio-select-specific.png) Figure 4. Searching for the Amazon SQS Receive Messages source 2. Drag the source onto the canvas. 3. In the configuration screen, click the plus sign (**+**) next to the **Connector configuration** field to add a global element for the source. 4. Enter values for the required fields. 5. On the **Advanced** tab for the global element, specify a reconnection strategy. For information, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 6. Click **Test Connection** to confirm that Mule can connect with the specified server. 7. Click **OK**. ## Configure the Connector To configure a connector in your Mule app, first configure a global element that can be used by all instances of that connector in the flow: 1. In the **Mule Palette** view, search for the connector and select the desired operation. 2. Drag the operation onto the canvas to the right of the source. 3. In the configuration screen for the operation, click the plus sign (**+**) next to the **Connector configuration** field to add a global element for connector. 4. Specify the global element properties for the connector. 5. On the **Advanced** tab in the global element properties, specify a reconnection strategy, if supported. For information, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview) and the reference guide for the connector. 6. Click **Test Connection** to confirm that Mule can connect with the specified server. 7. Click **OK**. After you configure a global element, configure the other fields for the connector. For information about configuring a specific connector, see the user guide and reference guide for that connector. ## See Also - [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview) - [Salesforce Help](https://help.salesforce.com) --- product: Connectors --- # Windows Gateway Services Configuration Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Windows Gateway Services provides connectivity to proprietary functionality on the Windows platform, and is used by the following connectors: - [MSMQ Connector](https://docs.mulesoft.com/msmq-connector/latest/) - [Dynamics CRM Connector](https://docs.mulesoft.com/microsoft-dynamics-crm-connector/latest/) - [Dynamics AX Connector](https://docs.mulesoft.com/microsoft-dynamics-ax-connector/latest/) ## Before You Begin - `Java Cryptography Extensions` must be installed on the server where Mule is installed. The JCE package is required to allow the Connector to use HTTPS to communicate securely. You can install JCE for your Java version from the Oracle website: [Oracle Java Downloads](https://www.oracle.com/java/technologies/downloads/) - To enable TLS 1.2 on servers that run Windows Server 2008 R2, you must create the `DisabledByDefault` entry in the appropriate subkey (Client, Server) and set it to `0`. The entry does not appear in the registry and it is set to `1` by default. [TLS/SSL Settings](https://docs.mulesoft.com/connectors/windows-gateway-services/%3Chttps://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn786418(v=ws.11)?redirectedfrom=MSDN>) - The installation is supported on Windows Server 2008, 2008 R2, and 2012 with .NET Framework 4.5 or later using: - Windows Server 2016 - .NET Framework Version 4.7 - Windows Server 2019 - .NET Framework Version 4.8 - Windows Server 2022 - .NET Framework Version 4.8 - Windows Server 2025 - .NET Framework Version 4.8.1 ## Installing the Windows Gateway Services To install Windows Gateway Services: 1. [Download the Windows Gateway Services installer](https://repository-master.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/anypoint-windows-gateway-service/1.12.0/anypoint-windows-gateway-service-1.12.0.zip). 2. Unzip the software distribution. 3. Double-click the `Anypoint-Windows-Gateway-Service.exe` file. 4. Click **Options** to change the installation location, or click **Install** to start the installation. 5. To use MSMQ Connector with the Gateway Services, copy the Authentication Token that is displayed for later use when you configure the connection in Anypoint Studio, otherwise skip this step. 1. After you copy the token, click **Install**. After the installation completes, the installer gives you the option to view the `readme.txt` file with additional instructions. 6. Click **Finish** to exit. 7. The installation creates the Anypoint Windows Gateway service, which the installer starts. To view the running service in Windows 7, when the Control Panel View by option is set to Small icons, select **Control Panel > Administrative Tools > Services**. The service appears as Anypoint Gateway. ## Configuring the Anypoint Gateway The default installation location for the Windows Gateway Service is `c:\Program Files(x86)\Anypoint Gateway for Windows`. This folder contains the `Mule.SelfHost.exe` executable and the `Mule.SelfHost.exe.config` configuration file. > [!NOTE] If the configuration file doesn’t appear in the folder, in Windows 7, when the Control > Panel View by option is set to Small icons, select **Control Panel > Folder Options > View > Show > hidden files, folders, and drives**. The executable starts a new web server at port 9333 (default), which only accepts secure connections using HTTPS. You can change the port number where the Gateway listens in the following places within the `Mule.SelfHost.exe.config` configuration file: ```xml ... ... ... ``` This web server uses a self-signed SSL certificate, which is auto-generated during installation. The certificate is in the Personal folder of the Local Computer certificate store: ![Local Computer certificate store](/mulesoft/current/en-us/connectors/_images/win-gw-local-computer-cert-store.png) Because the Windows service relies on `http.sys` for self-hosting the web server, changes in the port number or SSL certificate require reconfiguring Windows. The Register-SslCert.ps1 PowerShell script in the installation directory handles this task. If the port or certificate changes, run the following command from a PowerShell console: Register-SslCert.ps1 - ``: The thumbprint of the SSL certificate. It must be stored in the Personal Folder of the Local Store Account. - ``: Windows User or Group that receives permissions to register the port. The account impersonating the Windows service or console application must be part of this group. - ``: HTTP port (**9333** is the default) you set in the configuration file. Example: Register-SslCert.ps1 a495cbf8c4af496f1ef81efb224c8097d039f922 everyone 9333 ## MSMQ Connector Settings ### Security Considerations For the MSMQ connector running in the Mule Runtime, the service first authenticates the call by inspecting the HTTP Authorization header as specified in RFC 2616. The authentication is done through this unique security token used by the MSMQ connector. This token is included on every HTTP request to the Gateway using the Mule scheme. The following example shows how MSMQ leverages the Gateway to connect to a specific queue sending the security token as specified in this section: ```text GET: https://localhost:9333/msmq?count=50 Authorization: mule 3nGdw7W+G1fSO2YBEHDmpo4N1Tg= Mule-Msmq-Queue-Name: .\private$\out Mule-Api-Version: 1.0 ``` The authorization token should match on the connector and the Gateway configuration file. The following configuration setting shows how the token is set within the Gateway configuration file Mule.SelfHost.exe.config : ```xml ``` When you configure the connector running in the Mule Runtime, set the authorization token value using the Gateway Access Token configuration setting (accessToken attribute at the connector’s XML configuration). **Note**: The installer for the Windows Gateway service automatically generates a cryptographically secure token for use by callers upon first install. This token is displayed and placed upon the clipboard during installation for easy copying into a Mule application. ### Impersonating a Windows User Through Custom HTTP Headers Users executing the call on behalf of a Gateway-served connector authenticate through two custom HTTP headers, mule-impersonate-username and mule-impersonate-password. These two headers represent the Windows credentials of an existing user in the Active Directory forest where the Windows Gateway service is running, or a local account on the machine hosting the service. When these HTTP headers are included in an HTTP Request, the Windows Gateway service authenticates and impersonates this user before executing the operation required by the connector. This provides the ability to configure the correct access control list permissions using Windows credentials. ## MSMQ Connector and Gateway Interaction The following diagram shows the interaction of the MSMQ connector with the Gateway, along with the main components used: ![Windows Gateway Services ASP .NET Web API and Mule ESB with Mule runtime and Jersey HTTP client running on JVM on the OS of your choice](/mulesoft/current/en-us/connectors/_images/msmq-windows-gateway.png) ### MSMQ Configuration Settings In the following table you can find the configuration settings that are only related to the MSMQ connector:
PropertyUsage

invalid-queue-name

The queue name where unreadable messages are moved.

transaction-timeout

The timeout for processing messages after they are retrieved by the connector. When the cleanup task finds a message with an expired timeout, it moves the message to the main queue to be so that it’s available again. For details, check the two-phase commit section of the connector’s user guide.

invalid-message-timeout

The timeout for invalid messages for when the payload of a message is parsed with an incorrect formatter.

cleanup-delay

The delay time for the cleanup task to start looking for expired messages after they are retrieved for processing. For details, check the two-phase commit section of the connector’s user guide.

cleanup-username

(Optional) The user to impersonate when running the cleanup task. If you choose to leave this setting empty, then the user account running the service will be used.

cleanup-password

(Optional) The password for the user to impersonate when running the cleanup task.

### Impersonating a Windows User From a Remote Queue When your queue is marked to require authentication, you can impersonate the caller user as specified in the configuration settings. Additionally, if you work with a remote queue, the connector has a particular header to override this behavior. ### Work with Remote Queues If the Anypoint Gateway service runs on one machine and must access a remote queue on another machine, you must do one of these options (based on your environment configuration): - Verify machine grouping 1. Ensure that both machines belong to the same workgroup. 2. If anonymous access isn’t enabled, grant full access to the `Anonymous` user on the remote queue. 3. Verify that the `GET` operation works successfully under these updated anonymous access settings. - Grant domain membership and permissions 1. Ensure that both machines are members of the same domain. 2. Add the machine running the Anypoint Gateway service to the permission settings of the remote queue. Grant full access to this machine on the remote queue. 3. Verify that the `GET` operation works successfully under these domain and permission settings. ### Load Balanced Configuration Windows Gateway Services supports running in a load-balanced configuration to allow for fault tolerance. When running multiple Gateway Services instances, each member must be configured to perform MSMQ background jobs at a non-overlapping interval. MSMQ background job processing is by default performed every 10 minutes starting at zero minutes past the hour. To prevent multiple gateway instances simultaneously attempting to perform cleanup on the queues when running in a load-balanced configuration, a setting called `cleanup-delay` must be specified on each gateway instance. The recommended value to use for this on each machine is (10 / instanceCount) \* (instanceNumber - 1) where instanceNumber is an integer value 1..n. For example, a cluster of two machines would use a cleanup-delay of 0 on machine 1 and 5 on machine 2. A cluster of three machines would use a cleanup-delay of 0 on machine 1, 3 on machine 2, and 6 on machine 3. Synchronize the clocks for the machines in your cluster by NTP or an equivalent mechanism to ensure this offset is applied correctly. The `cleanup-delay` setting is in the `Mule.SelfHost.config` file: ```xml ``` **Note**: When running in a load-balanced configuration, the Gateway Services must configured to run as 'Administrator' when the nodes involved (MSMQ, gateways) are under a WORKGROUP but not joined to a DOMAIN. When joined to the same DOMAIN the permissions for each of the nodes and objects involved (queues) should be correctly set by the domain’s administrator. ## Troubleshooting Windows Gateway Services Windows Gateway Services leverages the built-in .NET tracing system. Tracing messages are sent through switches to listeners, which are tied to a specific storage medium. The listeners for the trace source used by the connector are available in the configuration file: ```xml ``` The previous example configures three listeners for the output console, for files, and for Event Tracing for Windows (ETW). The trace source for the connector mule.gateway is configured to output the traces to the console and ETW only. ### Changing the Tracing Level Windows Gateway Services is configured to log Information events. This is configured in the `` element. If you want to log everything, use the Verbose level by changing it in the configuration element. Configure the tracing levels at the `` level in the configuration file: ```xml ``` Other possible levels are: - Error: Output error handling messages - Warning: Output warnings and error handling messages - Information: Output informational messages, warnings, and error handling messages - Off: Disable tracing To trace or debug the routing service within the Windows Gateway Services, there is a setting to enable to get more details about the error that was generated while connecting to the routing service. To get this information at the tracing listeners, enable it using the `includeExceptionDetailInFaults` attribute in the `serviceDebug` element. To do this, set its value to `true`: ```xml ... ``` This setting extends the error message returned by the service and adds an internal stack trace of the cause, which in some scenarios may help you understand what the issue or problem is. ### Enabling Console Tracing From the Command Line A useful way to troubleshoot issues is to enable the console listener (by default it is enabled, but if not then you should add it to the listeners section), and run the Windows Gateway Services from the command line. Within the console, you can see real-time information being traced, like requests, responses, and some warnings or errors. These are useful to see if the connector is reaching the Gateway properly, or other possible causes that could be generating a fault. 1. To enable the console listener, in case it is not, add it to the `listeners` collection: ```xml ... ``` 2. To run from the command line, stop the Anypoint Gateway service. 3. Go to the folder where Anypoint Gateway service is installed, which by default is `c:\Program Files(x86)\Anypoint Gateway for Windows`. 4. Run the Mule.SelfHost.exe application. This starts running a console and displays tracing events within it in real time. 5. When you are finished troubleshooting, close this console and restart the windows service. ### Enabling Event Tracing for Windows Event Tracing for Windows (ETW) is a very efficient built-in publish and subscribe mechanism for doing event tracing at the kernel level. There is little overhead in using this feature compared to other traditional tracing solutions that rely on I/O for storing the traces in persistence storage such as files or databases. As a built-in mechanism in Windows, many of the operating systems services and components use this feature as well. For that reason, not only can you troubleshoot the application but also many of the OS components involved in the same execution. In ETW, there are applications publishing events in queues (or providers) and other applications consuming events from those queues in real-time through ETW sessions. When an event is published in a provider, it goes nowhere unless there is a session collecting events on that queue. (The events are not persisted). The tracing system in .NET includes a trace listener for ETW, EventProviderTraceListener, which you can configure with a session identifier, which ETW uses to collect traces: ```xml ``` In the example, the session is associated with this identifier: `{47EA5BF3-802B-4351-9EED-7A96485323AC}` ### Collecting Session Traces 1. Open a Windows console and run this command to start a new session: logman start mysession -p {47EA5BF3-802B-4351-9EED-7A96485323AC} -o etwtrace.etl -ets 2. Run this command to stop the session: logman stop mysession -ets This generates the `etwtrace.etl` file with the tracing session data. 3. Run this command to generate a human readable file: tracerpt etwtrace.etl This command transfers useful information into the `dumpfile.xml` text file. For more information, see Tracerpt. ## See Also - [Download Windows Gateway Service](https://repository-master.mulesoft.org/nexus/content/repositories/releases/org/mule/modules/anypoint-windows-gateway-service/1.12.0/anypoint-windows-gateway-service-1.12.0.zip). - [JCE download](https://www.oracle.com/java/technologies/downloads/). - [Tracerpt](https://docs.mulesoft.com/connectors/windows-gateway-services/%3Chttps://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc732700(v=ws.11)?redirectedfrom=MSDN>). - [Create the DisabledByDefault entry](https://docs.mulesoft.com/connectors/windows-gateway-services/%3Chttps://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn786418(v=ws.11)?redirectedfrom=MSDN>). - Windows Gateway Service leverages the following technologies and frameworks: ASP.NET Web API exposes an HTTP web API that sends and receives raw messages. [OWIN](http://owin.org/) provides the HTTP layer. Open Web Interface for .NET (OWIN) is an open specification for decoupling applications from web server functionality, which provides a layer for making all the HTTP concerns independent of the hosting platform. Katana provides the OWIN Microsoft implementation, which handles self and IIS hosting for OWIN applications. - [Salesforce Help](https://help.salesforce.com)