dev-master
9999999-devStomp bundle for Symfony 2
GPL
The Requires
by Ludovic Bouguerra
bundle stomp
Wallogit.com
2017 © Pedro Peláez
Stomp bundle for Symfony 2
Symfony StompClient Integration., (*1)
Download this bundle using composer :, (*2)
In your composer.json add :, (*3)
"activpik/stomp-bundle": "dev-master"
In your config.yml file add theses lines, (*4)
activpik_stomp:
sandbox: false
connections:
kalyzee_messenging :
host: localhost
port: 61613
producers:
activpik_producer:
destination: activpik/producer
connection: kalyzee_messenging
activpik_producer2:
destination: activpik/producer2
connection: kalyzee_messenging
You can define a connection to a message broker by adding an connections item. You can define a producer by adding an item to "producers"., (*5)
Sandbox allows you to test your application without send message., (*6)
Usage in a Symfony2 Controller, (*7)
First you have to create a message :, (*8)
$message = $this->container->get("activpik_stomp_message_factory")->createMessage(array("id" => "id", "value"=>"value"));
After you can send it with this command :, (*9)
$this->container->get("activpik_stomp")->send("activpik_producer", $message);
Stomp bundle for Symfony 2
GPL
bundle stomp