activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sravuri <ravurisu...@gmail.com>
Subject Messages are being lost
Date Fri, 02 Apr 2010 11:55:45 GMT

I am using activemq to connect my Java based system with PHP based system.
Here Java based system acts as producer and PHP system is the consumer of
the messages( I am using STOMP prootocal  here ).

In case Java Program sends 10 messsages, my PHP client is able to recieve
only 5 messages. Every alternative message is being lost. To give some Idea
of what I am doing, I am pasting my code(php) here.

################################

<?php
require_once 'Stomp.php';

$c = new StompConnection("localhost");
$result = $c->connect("hiram", "test");
print_r($result);

$c->subscribe("/queue/TOOL.DEFAULT");
$i = 1;

while($i <= 10)
{
$frame = $c->readFrame();
echo "test\n";

if ( $frame != null)
{
echo $frame->body; //process your message
echo "\n";
}
 }
$c->disconnect();
?>
##################################################

I have not called ack method here, as stomp.php I downloaded does not have
ack() method. Please suggest me the way out.




-- 
View this message in context: http://old.nabble.com/Messages-are-being-lost-tp28118270p28118270.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message