Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ibmmq-wrapper

alexdeia10MIT0.1.0

A light library-wrapper for ibmmq with easy interface.

mq, ibmmq

readme

ibmmq-wrapper

A light library-wrapper for ibmmq with easy interface.

Features

  • configurable
  • getting messages with processing in callback
  • putting messages (commit/backout support)

Requirements

Installation

# Using NPM
$ npm install --save ibmmq-wrapper

# Using Yarn
$ yarn add ibmmq-wrapper

Usage

import * as IBMMQWrapper from 'ibmmq-wrapper';
//or
const IBMMQWrapper = require('ibmmq-wrapper');

//Pass your queue's params
const fooQueue = new IBMMQWrapper(connName, channelName, queueManager, queueName);

// Getting msg
fooQueue.getMessages((err, msg) => {
  if (err) {
    console.log(err);
  }
  console.log(msg);
});

// Getting msg with options
const getOpts = {
  options: ['MQGMO_NO_SYNCPOINT', 'MQGMO_WAIT'],
  matchOptions: 'MQMO_NONE',
  waitInterval: 'MQWI_UNLIMITED',
};

fooQueue.getMessages((err, msg) => {
  if (err) {
    console.log(err);
  }
  console.log(msg);
}, getOpts);

// Putting msg in queue
fooQueue.putMessage('test');

//Putting msg in queue with options
const putOpts = {
  options: ['MQPMO_NO_SYNCPOINT', 'MQPMO_NEW_MSG_ID', 'MQPMO_NEW_CORREL_ID'],
};

fooQueue.putMessage('new test', putOpts);

API

constructor(connName, channelName, queueManager, queueName)

getMessages(cb, opts)

putMessage(msg, opts)

Configuration

These are the available config options for:

changelog

Changelog

All notable changes to this project will be documented in this file.

In progress...

0.1.0 - 2020-08-28

Added

Changed

Removed

0.0.4 - 2020-08-28

Added

Changed

Removed