MongoDB Cloud Connector Reference
+ *Purpose:* The Mongo DB Cloud Connector provides a means for a Mule application to connect to a Mongo DB database.
Minimum Configuration: The configuration reference, Config reference, is set to a Mongo DB global element that you have previously set up in Mule Studio. For the Mongo DB global element, you need a client reference, connection information (database name, host location, and port number), and authentication credentials (user name and password) for the database.
Discussion: You must have created a Mule Studio global element for the Mongo DB cloud connector. You can do so from the Global Element pane prior to dropping the Mongo DB Cloud Connector on the canvas. Or, you can create the global element from within a Mongo DB Pattern Properties dialog, when setting the Config reference property.
Set the Config reference and Operation properties from the General tab in the Pattern Properties dialog:
Select the Mongo DB global element for the configuration reference from the Config reference pull-down list. If you have not yet created a Mongo DB global element, click the Add button to do so. (See Mongo DB Global Element.)
Select a Mongo DB operation from the Operation pull-down list. Operations correspond to the available Mongo DB APIs.
After you select an operation, the bottom half of the screen displays the properties that can be set for the selected operation. (See the figure below.)
Properties marked with a red x are required. Properties not marked with a red x are optional. For example, if you select Create index for the operation, the Pattern Properties pane displays the properties required for this operation, including:
Both the collection name and the field on which the index is created are required and are marked with a red x. The index order is also required and defaults to ASC, or ascending. Use the pull-down list to change the order to DESC, or descending.
Click the Add button next to the Config reference field in the Pattern Properties dialog to create a Mongo DB global element. (You can also do this from the Global Elements pane.) If you have selected a Mongo DB global element from the Config reference pull-down list, you can click the Edit button to modify configuration values in that global element.
You enter the Mongo DB client reference, connection information (database name, host, port), and authentication information (username and password) in the global element properties. Mule Studio provides default values for the connection properties.
For complete information on configuring properties for the available Mongo DB APIs, click here.