Skip to content

php-mq/client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

39775ec · Jan 1, 2018

History

33 Commits
Jan 1, 2018
Jul 27, 2017
Jul 27, 2017
Sep 3, 2017
Sep 4, 2017
Jul 27, 2017
Jan 1, 2018
Jul 27, 2017
Jul 27, 2017
Jan 1, 2018
Jul 27, 2017
Jan 1, 2018
Jan 1, 2018

Repository files navigation

Build Status Latest Stable Version Total Downloads Coverage Status

PHPMQ\Client

Description

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

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.

About

Client that communicates with PHPMQ server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages