activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manua <agarwal.m...@gmail.com>
Subject Subscriber on a secure topic goes in unack infinite loop
Date Mon, 22 Aug 2011 16:26:02 GMT
HI,

I have defined a secure topic in the activemq.xml, where only admin can
write and user can only read.

If the topic exists and subscriber is subscribed it works fine.
But if the topic is not there and subscriber tries to subscribe it gets the
message that user doesn't have the permissions to create the topic(as
expected), but after that subscriber sends a Ack and stuck in infinite loop
with the message unexpected ACK received.

Please find below my code snippet for the subscriber,

my $broker = defined($ARGV[0])? $ARGV[0] : "manu.rsi.com";
my $stmp = Net::Stomp->new( { hostname => $broker, port => 61612} );
$stmp->connect( { login => 'user', passcode => 'password' });

my $destination = "/topic/Test.T";

$stmp->subscribe(
				{
					destination             => $destination,
					'ack'                   => 'client',
					'activemq.prefetchSize' => 1000,
				}
			);

while(1){
	my $frm = $stmp->receive_frame({ timeout => 300 });
	$stmp->ack( { frame => $frm } );
	print Dumper $frm;
}

Is this the expected behavior in case of secure topics or am I doing
something wrong.

Thanks
Manu

--
View this message in context: http://activemq.2283324.n4.nabble.com/Subscriber-on-a-secure-topic-goes-in-unack-infinite-loop-tp3760584p3760584.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message