activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cronos <vicker...@googlemail.com>
Subject Client Disconnection Bug?
Date Thu, 26 Jul 2007 04:55:46 GMT

I am trying to get a php stomp client to connect to AMQ 4.1.1, check if any
message is avaliable
and if not, disconnect. Simple enough task u might think.. However, i am
finding the broker behaviour 
odd to say the least. Here is a sample of the client code, i am using.

<?
include_once("stomp.php");

$c = new StompConnection("localhost","51516");
$c->connect();
$c->subscribe("/queue/foo");			
    	
$result = $c->readFrame();
$disc = $c->disconnect();

//If(!$disc) {

//$c->unsubscribe("/queue/foo");	
//$c->disconnect(); 
//       {       

?>

when, there is a message in the queue before the client connects, the
behaviour is as
expected. The client disconnects and the message or messages are not
dequeued....
since no ACK is sent.

However, if there is no message in the queue, the client keeps waiting for a
message rather
than disconnecting. The commented code is what i have tried to use to force
a disconnection,
but that doesn't work.

It is expected AMQ 4.1.1 behaviour that the client MUST wait until a message
arrives in the queue 
before disconnecting? Any help appreciated.

Thank you




-- 
View this message in context: http://www.nabble.com/Client-Disconnection-Bug--tf4149361s2354.html#a11804183
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message