Coder Social home page Coder Social logo

Queue Interoperability

Latest Stable Version Monthly Downloads Total Downloads License

About

queue-interop tries to identify and standardize a common way for PHP programs to create, send, receive and read MQ messages to achieve interoperability.

Through discussions and trials, we try to create a standard, made of common interfaces but also recommendations.

If PHP projects that provide queue implementations begin to adopt these common standards, then PHP applications and projects that use MQs can depend on the common interfaces instead of specific implementations. This facilitates a high-level of interoperability and flexibility that allows users to consume any MQ transport implementation that can be adapted to these interfaces.

The work done in this project is not officially endorsed by the PHP-FIG. We adhere to the spirit and ideals of PHP-FIG.

Installation

You can install this package through Composer:

# Install a Queue Interop compatible transport, for example 
$ composer require enqueue/fs

Examples

Send a message:

<?php

use Enqueue\Fs\FsConnectionFactory;

$context = (new FsConnectionFactory())->createContext();

$context->createProducer()->send(
    $context->createQueue('aQueue'), 
    $context->createMessage('aBody')
);

Consume a message:

<?php

use Enqueue\Fs\FsConnectionFactory;

$context = (new FsConnectionFactory())->createContext();

$consumer = $context->createConsumer($context->createQueue('aQueue'));

$timeout = 5000; // 5sec
if ($message = $consumer->receive($timeout)) {
    // process the message.

    $consumer->acknowledge($message);
}

Find out more here:

Compatible projects

Projects

Implementations

Amqp interop

There is AMQP interop built on top of Queue Interop. It is completly compatible with queue interop and only adds some AMQP specific features:

  • Queue\Exchange declaration
  • Queue\Exchange Binding.
  • Basic consume support.
  • and other AMQP specific features.

Compatible projects

Workflow

Everyone is welcome to join and contribute.

We try to not break BC by creating new interfaces instead of editing existing ones.

While we currently work on interfaces, we are open to anything that might help towards interoperability, may that be code, best practices, etc.

License

MIT license

queue-interop's Projects

amqp-interop icon amqp-interop

PHP 7.1+. Promoting the interoperability of AMQPs. It is based on queue-interop

ext icon ext

Queue Interfaces wrapped into a PHP extension.

queue-spec icon queue-spec

Contains specs that could be used to provide the implementation works as expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.