PHPackages                             opm87/mqseries-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. opm87/mqseries-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

opm87/mqseries-php
==================

client to WebSphere MQ Queue Manager using the PHP mqseries pecl extension for Laravel framework

v0.1.6.1(2y ago)1117↓100%1Apache-2.0PHPPHP &gt;=5.5.9

Since Aug 17Pushed 2y agoCompare

[ Source](https://github.com/OPM87/mqseries-php)[ Packagist](https://packagist.org/packages/opm87/mqseries-php)[ RSS](/packages/opm87-mqseries-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (8)Used By (0)

mqseries-php
============

[](#mqseries-php)

client to WebSphere MQ Queue Manager using the PHP mqseries pecl extension for Laravel. This is a fork of

How
===

[](#how)

- Install the WebSphere MQ Client library.
    - [Download from here](http://www-01.ibm.com/software/integration/wmq/clients/ "Download from here")
    - [IBM documentation](http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.1.0/com.ibm.mq.doc/zi00110_.htm "IBM Documentation")
- Install the PECL module mqseries. Download from here:
    - [documentation](http://www.php.net/mqseries)
- Install this library
- Make a connection to a queue and retrieve messages.

Installation
------------

[](#installation)

Issue following command in console:

```
composer require bariton3/mqseries-php
```

Alternatively edit composer.json by adding following line and run **`composer update`**

```
"require": {
		....,
		"bariton3/mqseries-php",

	},
```

Configuration
-------------

[](#configuration)

Register package service provider and facade in 'config/app.php'

```
'providers' => [
    ...
    MqSeries\ServiceProvider\MqSeriesServiceProvider::class,
]

'aliases' => [
    ...
    'MqSeries' => MqSeries\Facades\MqSeriesFacade::class,
]
```

Publish configuration file using **`php artisan vendor:publish --tag=mqseries --force`** or simply copy package configuration file and paste into **`config/mqseries.php`**

Open configuration file **`config/mqseries.php`** and add your service key

```
    /*
    |----------------------------------
    | Service Keys
    |------------------------------------
    */

    'channel' => 'ADD MQ_SERIES_CHANNEL HERE',
    'queue_name' => ' ADD MQ_SERIES_QUEUE_NAME HERE',
    'queue_manager' => 'ADD MQ_SERIES_QUEUE_MANAGER HERE',
    'ip' => ' ADD MQ_SERIES_IP HERE',
    'port' => 'ADD MQ_SERIES_PORT HERE',
    'options' => MQSERIES_MQCNO_STANDARD_BINDING,
```

If you like to use different keys for any of the services, you can overwrite master API Key by specifying it in the `service` array for selected web service.

Usage
=====

[](#usage)

```
	//Open Queue:
	$openParams = new MqSeries\Open\Params();
	$openParams->objectDescType = MQSERIES_MQOT_Q;
	$openParams->objectName = config('mqseries.queue_name');
	$openParams->objectQMName  = '';
	$openParams->option = MQSERIES_MQOO_OUTPUT | MQSERIES_MQOO_INPUT_AS_Q_DEF | MQSERIES_MQOO_FAIL_IF_QUIESCING;

	try {
		$queueOpenResult = MqSeries::openQueueOnQM($openParams);
	} catch (MqSeries\QueueManagerConnectionFailedException $ex) {
		die('Exception when opening queue: ' . $ex->getCode() . ' - ' . $ex->getMessage());
	} catch (ExtensionNotLoadedException $ex) {
		die('YOU MUST FIRST ENABLE THE mqseries PHP EXTENSION');
	} catch (NoConnectionParametersException $ex) {
		die('YOU DID NOT PROVIDE CONNECTX PARAMS!');
	}

	if ($queueOpenResult !== true) {
	die(
	    'SOMETHING WENT WRONG WHEN OPENING THE QUEUE: ' .
	    sprintf(
	        "CompCode:%d Reason:%d Text:%s\n",
	        MqSeries::getLastCompletionCode(),
	        MqSeries::getLastCompletionReasonCode(),
	        MqSeries::getLastCompletionReason()
	    )
	);
	}

	// put the message on the queue.
	$mqPutParams = new MqSeries\Put\Params();
	$mqPutParams->gmoOptions = MQSERIES_MQPMO_NEW_MSG_ID;

	MqSeries::putMessageToQueue($mqPutParams, 'PING');

	if (MqSeries::getLastCompletionCode() !== MQSERIES_MQCC_OK) {
		die(printf("put CompCode:%d Reason:%d Text:%s\n", MqSeries::getLastCompletionCode(), MqSeries::etLastCompletionReasonCode(), MqSeries::getLastCompletionReason()));
	}

	//Get one message from queue:
        $messageContent = '';
        $mqGetParams = new MqSeries\Get\Params();
        $mqGetParams->gmoOptions = MQSERIES_MQGMO_FAIL_IF_QUIESCING | MQSERIES_MQGMO_WAIT | MQSERIES_MQGMO_CONVERT;
        $mqGetParams->gmoWaitInterval = 5000;

        try {
            $messageContent = MqSeries::getMessageFromQueue($mqGetParams);
            echo $messageContent."\n";
        }
        catch (QueueIsEmptyException $ex) {
            echo "The queue is empty, no big deal.";

            if (is_string($messageContent)) {
                echo 'message retrieved from queue: ' . $messageContent;
            } else {
                die(
                    'SOMETHING WENT WRONG WHEN RETRIEVING A MESSAGE: ' .
                    sprintf(
                        "CompCode:%d Reason:%d Text:%s\n",
                        MqSeries::getLastCompletionCode(),
                        MqSeries::getLastCompletionReasonCode(),
                        MqSeries::getLastCompletionReason()
                    )
                );
            }
        }

        //Close & disconnect:
        MqSeries::close();
        MqSeries::disconnect();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~447 days

Recently: every ~377 days

Total

7

Last Release

875d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4279913?v=4)[Matthias](/maintainers/OPM87)[@OPM87](https://github.com/OPM87)

---

Top Contributors

[![bariton3](https://avatars.githubusercontent.com/u/6236604?v=4)](https://github.com/bariton3 "bariton3 (16 commits)")[![OPM87](https://avatars.githubusercontent.com/u/4279913?v=4)](https://github.com/OPM87 "OPM87 (7 commits)")[![atatarchuk](https://avatars.githubusercontent.com/u/24654182?v=4)](https://github.com/atatarchuk "atatarchuk (3 commits)")[![cedroux](https://avatars.githubusercontent.com/u/2563986?v=4)](https://github.com/cedroux "cedroux (2 commits)")[![welcoMattic](https://avatars.githubusercontent.com/u/773875?v=4)](https://github.com/welcoMattic "welcoMattic (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/opm87-mqseries-php/health.svg)

```
[![Health](https://phpackages.com/badges/opm87-mqseries-php/health.svg)](https://phpackages.com/packages/opm87-mqseries-php)
```

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k822.4M6.8k](/packages/symfony-http-kernel)[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k132.9M468](/packages/zircote-swagger-php)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[lomkit/laravel-rest-api

A package to build quick and robust rest api for the Laravel framework.

59152.2k](/packages/lomkit-laravel-rest-api)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
