I am trying to configure a queue on Apollo 1.6 that will be written to PHP using STOMP and will be used by Java using the openwire ActiveMQ client.
I can read and write in turn with Java, I can read and write to it with PHP, and I can write messages from Java and read them with PHP, but I can not write messages with PHP and read them with Java, this what i really want to do.
When I look at the queue using the Apollo admin UI, I can see all the messages that I send with PHP / STOMP, and with Java / ActiveMQ in the test queue that I created. The codec for php messages is stomping, and for java messages - openwire. My php client reads both types of messages, but my java client does not read stompers.
Here is a gist with a distilled example:
- Apollo.java reads and writes to the test queue
- send.php writes to the test queue
- recv.php reads from the test queue
- apollo.xml is the apollo configuration used to configure the test queue.
I printed out StompFrames received by php, the first one was sent by java / openwire, the second one was php / stomp:
➜ stomp-php-1.0.0 php -f recv.php Received from /queue/test: StompFrame Object ( [command] => MESSAGE [headers] => Array ( [destination] => [content-length] => 256 [content-type] => protocol/openwire [message-id] => demo-71 ) [body] => {/ID:uspdxml-drevel.local-57993-1378699215106-1:1dtestn{/ID:uspdxml-drevel.local-57993-1378699215106-1:1A O hello! ) ➜ stomp-php-1.0.0 php -f send.php ➜ stomp-php-1.0.0 php -f recv.php Received from /queue/test: StompFrame Object ( [command] => MESSAGE [headers] => Array ( [message-id] => demo-81 [destination] => /queue/test ) [body] => world )
source share