The MQ Light connector enables LoopBack applications to use the MQ Light messaging API.Note: This page was generated from the loopback-connector-mqlight/README.md.

loopback-connector-mqlight

IBM MQ Light® is a simple yet powerful AMQP-based messaging API. The loopback-connector-mqlight module is the Loopback connector for IBM MQ Light.

The LoopBack MQ Light connector supports:

Installation

Enter the following in the top-level directory of your LoopBack application:

  1. $ npm install loopback-connector-mqlight --save

The —save option adds the dependency to the applications package.json file.

Configuration

Use the data source generator to add the MQ Light data source to your application. The resulting entry in the application’s server/datasources.json will look something like this:

  1. "mymq": {
  2. "name": "mymq",
  3. "connector": "mqlight"
  4. }

Edit server/datasources.json to add other supported properties as required:

  1. "mydb": {
  2. "name": "mymq",
  3. "connector": "mqlight",
  4. "username": <username>,
  5. "password": <password>,
  6. "service": <service URI>
  7. }

The following table describes the connector properties.

PropertyTypeDescription
serviceStringConnection URI for MQ Light service
usernameStringMQ Light service username
passwordStringMQ Light service password associated with the username above

Examples can be found in the test directory.

Testing

Start a local MQ Light server:

  1. $ $MQLIGHT_HOME/mqlight-start

You can download a free copy at https://developer.ibm.com/messaging/mq-light/.

Then run the tests:

  1. $ npm test

We run tests against the latest developer builds. Early access builds are notguaranteed to pass (use at your own risk).

Tags: connectorsreadme