Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Php connect with STOMP, activemq

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Php connect with STOMP, activemq

Postby Signalman » Mon Dec 17, 2012 3:44 pm

Ok, I am new to this forum, and also new to php, so apologies in advance if I have posted this in the wrong forum, or of it has been answered previously (although I did search prior to posting).

The setup I have is running windows xp, using activemq, STOMP and php.

I have installed active my, and started it running, this would appear to be confirmed by the fact that I can see it in Internet explorer.

I have downloaded STOMP and as I am unsure how to insert a link to a library in the php code, I have put everything in the one directory (editing the STOMP files where they specify a sub directory).

When i run the sample php code, it does not have the desired effect, but generates the following :-


Code: Select all
connect(); // 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(); ?>


I have tried numerous things to get this to work, without success. I am sure it is something simple, once you know.

Any assistance would be appreciated.
Thanks in advance
Signalman
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sun Dec 16, 2012 6:27 pm

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.