activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Tang (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-1505) Durable/Persistant topics via Stomp on 5.0 snapshot don't seem to work
Date Tue, 27 Nov 2007 15:23:26 GMT
Durable/Persistant topics via Stomp on 5.0 snapshot don't seem to work
----------------------------------------------------------------------

                 Key: AMQ-1505
                 URL: https://issues.apache.org/activemq/browse/AMQ-1505
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.0.0
         Environment: Linux, Centos-4 (RHEL clone), activemq snapshot (apache-activemq-5.0-20071120.092745)
            Reporter: Alex Tang


I noticed a problem where durable/persistent topic messages are not being sent to offline
consumers in 5.0 when the consumer is reconnected.

The following test code works in activemq-4.1.1, but does not in 5.0-snapshot (5.0-20071120.092745)

I have the following test perl code using Net::Stomp

  #publisher
  use strict;
  use warnings;
  use Net::Stomp;
  my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } );
  $stomp->connect( { login => 'hello', passcode => 'there' } );
  $stomp->send( { destination => '/topic/foo', body => 'test message', persist =>
'true' } );
  $stomp->disconnect;

And the following consumer:

  # subscribe to messages from the topic 'foo'
  use strict;
  use warnings;
  use Net::Stomp;
  my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } );
  $stomp->connect (
      {
          login => 'hello',
          passcode => 'there' ,
          'client-id' => 'tango',
      }
  );
  $stomp->subscribe(
      {   destination             => '/topic/foo',
          'ack'                   => 'client',
          'activemq.prefetchSize' => 1,
          'activemq.subscriptionName' => 'tango',
      }
  );
  while (1) {
    my $frame = $stomp->receive_frame;
    warn $frame->body; # do something here
    $stomp->ack( { frame => $frame } );
  }
  $stomp->disconnect;

On activemq 4.1.1, the subscription is durable/persistent (i can disconnect the consumer and
any messages sent by the producer will be received by the consumer when the consumer is reconnected).
 However, on the 5.0 snapshot, i cannot get any messages that are sent by the producer when
the consumer is offline to be received by the consumer when the consumer is reconnected. 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message