2017 © Pedro Peláez
 

library client

PHPMQ Client

image

php-mq/client

PHPMQ Client

  • Monday, January 1, 2018
  • by hollodotme
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 20 % Grown

The README.md

Build Status Latest Stable Version Total Downloads Coverage Status, (*1)

PHPMQ\Client

Description

The PHPMQ client to send, consume and acknowledge messages in interaction with the PHPMQ server., (*2)

Installation

composer require php-mq/client

Usage

Sending a message to the message queue server

<?php declare(strict_types=1);

namespace YourVendor\YourProject;

use PHPMQ\Client\Client;
use PHPMQ\Client\Types\QueueName;
use PHPMQ\Client\Sockets\ClientSocket;
use PHPMQ\Client\Sockets\Types\NetworkSocket;

$networkSocket = new NetworkSocket( '127.0.0.1', 9100 );
$clientSocket  = new ClientSocket( $networkSocket );
$client        = new Client( $clientSocket );

$client->sendMessage( 
    new QueueName( 'Example-Queue' ), 
    'This is an example message.'
);

$client->disconnect();

Contributing

Contributions are welcome and will be fully credited. Please see the contribution guide for details., (*3)

The Versions

01/01 2018