friends-of-reactphp / stomp

STOMP bindings for ReactPHP.
MIT License
115 stars 42 forks source link

Add Apollo and ActiveMQ compatibility #11

Closed romainneutron closed 11 years ago

romainneutron commented 11 years ago

ActiveMQ frames might start with a new-line caracter, producing an offset error in the parser.

Example of ActiveMQ frame :

\nMESSAGE\ncontent-type:text/plain\ndestination:/topic/foo\ntimestamp:1356608654862\ncontent-length:10\npriority:4\n\nle message
romainneutron commented 11 years ago

I've finally added a script that picks the appropriated configuration to run examples.

Now, examples run as follow :

php stomp-basic.php rabbitmq
php stomp-basic.php apollo

If you do not provide anything or a wrong config name :

[ romain @MacBook ] php stomp-basic.php 
Configuration `` does not exist, available configurations are : activemq, apollo, rabbitmq

Ex : /usr/bin/php stomp-basic.php rabbitmq
[ romain @MacBook ] php stomp-basic.php libellule
Configuration `libellule` does not exist, available configurations are : activemq, apollo, rabbitmq

Ex : /usr/bin/php stomp-basic.php rabbitmq
igorw commented 11 years ago

Nice, can we strip the stomp- prefix altogether?

romainneutron commented 11 years ago

PR is up to date