/enqueue-dev

Messaging solutions for PHP. Development repository

Primary LanguagePHPMIT LicenseMIT

Message Queue. Development Repository

Gitter Build Status

This is where all development happens. The repository provides a friendly environment for productive development and testing of all enqueue related packages.

Features:

  • JMS like transport abstraction.

  • Feature rich.

  • Supports transports:

  • Generic purpose abstraction level (the transport level).

    <?php
    use function Enqueue\dsn_to_context;
    use function Enqueue\send_queue;
    use function Enqueue\consume;
    use Enqueue\Psr\PsrMessage;
    use Enqueue\Consumption\Result;
    
    // composer require enqueue/enqueue enqueue/amqp-ext
        
    $c = dsn_to_context('amqp:://');
    
    send_queue($c, 'a_queue', 'Hello there');
       
    consume($c, 'a_queue', function(PsrMessage $message) {
       $body = $message->getBody();
      
       // to stop consumption: throw new \Enqueue\Consumption\Exception\ConsumptionInterruptedException;  
      
       return Result::ACK;
    });
  • Easy to use abstraction level (the client level).

    <?php
    use Enqueue\SimpleClient\SimpleClient;
    use Enqueue\Psr\PsrMessage;
    use Enqueue\Consumption\Result;
    
    // composer require enqueue/simple-client enqueue/fs
    
    $client = new SimpleClient('file://');
    $client->bind('a_topic', 'a_processor', function(PsrMessage $message) {
        $body = $message->getBody();
        
        // to stop consumption: throw new \Enqueue\Consumption\Exception\ConsumptionInterruptedException;
        
        return Result::ACK;
    });
    
    $client->setupBroker();
    
    $client->send('a_topic', 'Hello there');
    
    $client->consume();
  • Symfony bundle

  • Magento1 extension

  • Message bus support.

  • RPC over MQ support.

  • Temporary queues support.

  • Well designed components decoupled and reusable.

  • Carefully tested including unit and functional tests.

  • For more visit quick tour.

Resources

Developed by Forma-Pro

Forma-Pro is a full stack development company which interests also spread to open source development. Being a team of strong professionals we have an aim an ability to help community by developing cutting edge solutions in the areas of e-commerce, docker & microservice oriented architecture where we have accumulated a huge many-years experience. Our main specialization is Symfony framework based solution, but we are always looking to the technologies that allow us to do our job the best way. We are committed to creating solutions that revolutionize the way how things are developed in aspects of architecture & scalability.

If you have any questions and inquires about our open source development, this product particularly or any other matter feel free to contact at opensource@forma-pro.com

License

It is released under the MIT License.