2017 © Pedro Peláez
 

symfony-bundle crossbar-http-publisher-bundle

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

image

facile-it/crossbar-http-publisher-bundle

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  • Wednesday, December 20, 2017
  • by peelandsee
  • Repository
  • 33 Watchers
  • 10 Stars
  • 2,278 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 11 Versions
  • 1 % Grown

The README.md

CrossbarHTTPPublisherBundle

Stable release Unstable release Build status, (*1)

Coverage Status [![Scrutinizer][Master scrutinizer image]][Master scrutinizer link] SL Insight, (*2)

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher, which is a simple, lightweight websocket server implemented in Python., (*3)

Features

  • Define multiple publishers
  • Publishers are automatically registered into Syomfony's service container
  • Send signed requests easily
  • Skip SSL certificate verification (useful in dev environment)

Requirements

  • PHP >= 7
  • Guzzle 5 or 6
  • The following Symfony components (or the full-stack framework), version 2.7, 2.8, 3.x or 4.x:
    • symfony/framework-bundle
    • symfony/dependency-injection
    • symfony/config

Installation

Require this package with Composer:, (*4)

$ composer require facile-it/crossbar-http-publisher-bundle

... and register the bundle in your app (usually in app/AppKernel.php), (*5)

public function registerBundles()
{
    return array(
        // ...
        new Facile\CrossbarHTTPPublisherBundle\FacileCrossbarHTTPPublisherBundle(),
    );
}
````

## Configuration
You just need to configure the publishers that you need to use; here is an example of the config, with the default values:

```yaml
facile_crossbar_http_publisher:
  connections:
    dummy_publisher_1:
      protocol: https                     #default: http
      host: crossbar.io                   #default: 127.0.0.1 
      port: 443                           #default: 8080
      path: publish                       #default: publish, often just empty
      auth_key: this_is_very_key          #default: null
      auth_secret: this_is_very_secret    #default: null
      ssl_ignore: true                    #default: false
  dummy_publisher_2:
      host: crossbar.tu

Usage

Once you've done that, the publishers will be available as Symfony services in your container:, (*6)

$firstPublisher = $container->get('facile.crossbar.publisher.dummy_publisher_1');
$secondPublisher = $container->get('facile.crossbar.publisher.dummy_publisher_2');

$topic = 'com.myapp.topic1';

// using args
$firstPublisher->publish($topic, ['foo',1]);

// using kwargs
$secondPublisher->publish($topic, null, ['key'=>'value']);

// using both and printing Crossbar's response already decoded:
print_r($firstPublisher->publish($topic, ['foo',1], ['key'=>'value']));

// ouptuts:
//
// array(1) {
//   ["id"]=>
//   int(1395572605)
// }

The Versions

20/12 2017

dev-master

9999999-dev

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

20/12 2017

1.0.3

1.0.3.0

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

19/12 2017

dev-symfony4

dev-symfony4

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

09/11 2017

1.0.2

1.0.2.0

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

24/01 2017

1.0.1

1.0.1.0

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

23/01 2017

1.0

1.0.0.0

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

23/01 2017

dev-guzzle_6_compat

dev-guzzle_6_compat

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

18/01 2017

0.2

0.2.0.0

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

18/01 2017

dev-sf3_compat

dev-sf3_compat

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

18/01 2017

dev-travis_build_with_crossbar

dev-travis_build_with_crossbar

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by luca bo
by Alessandro Lai

symfony client guzzle websocket publisher crossbar

05/10 2015

0.1

0.1.0.0

This bundle allows to submit PubSub events via HTTP/POST requests to a Crossbar HTTP Publisher.

  Sources   Download

Apache License Version 2.0

The Requires

 

The Development Requires

by luca bo