2017 © Pedro Peláez
 

symfony-bundle stomp-bundle

A Symfony2 Bundle to wrap the fusesource/stomp-php library

image

happyr/stomp-bundle

A Symfony2 Bundle to wrap the fusesource/stomp-php library

  • Tuesday, June 9, 2015
  • by Nyholm
  • Repository
  • 2 Watchers
  • 0 Stars
  • 914 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 11 % Grown

The README.md

HappyR StompBundle

A Symfony2 bundle that integrates the Fusesource Stomp PHP library., (*1)

Installation

  1. Install with composer:, (*2)

    php composer.phar require happyr/stomp-bundle
    
  2. Enable the bundle:, (*3)

    // app/AppKernel.php
    
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new HappyR\StompBundle\HappyRStompBundle(),
        );
    }
    

Using the service

//get the connection
$con = $this->container->get('happyr.stomp.broker');

// send a message to the queue
$con->send("/queue/test", "test");
echo "Sent message with body 'test'\n";

// subscribe to the queue
$con->subscribe("/queue/test");

// receive a message from the queue
$msg = $con->readFrame();

// do what you want with the message
if ( $msg != null) {
    echo "Received message with body '$msg->body'\n";

    // mark the message as received in the queue
    $con->ack($msg);
} else {
    echo "Failed to receive a message\n";
}

// disconnect
$con->disconnect();

Full Default Configuration

happy_r_stomp:
    borker_uri: tcp://localhost:61613
    client_id: ~

More documentation

Since this bundle is just a wrapper for the fusesource/stomp-php library you should checkout their configuration., (*4)

The Versions

09/06 2015

dev-master

9999999-dev http://developer.happyr.se/symfony2-bundles/stomp-bundle

A Symfony2 Bundle to wrap the fusesource/stomp-php library

  Sources   Download

MIT

The Requires

 

queue message stomp fusesource stomp-php

09/11 2013

0.1.0

0.1.0.0 http://developer.happyr.se/symfony2-bundles/stomp-bundle

A Symfony2 Bundle to wrap the fusesource/stomp-php library

  Sources   Download

MIT

The Requires

 

queue message stomp fusesource stomp-php