You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by __Tango <al...@funkware.com> on 2007/11/27 08:23:09 UTC

Durable/Persistant topics via Stomp on 5.0 snapshot

Hi folks.  I'm a bit of a newbie to activemq.  I've been trying both the
4.1.1 and 5.0 snapshot (20071120.092745).  I was wondering if the method for
specifying persistant/durable topic publishing or subscribing has changed in
5.0.  

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.  

Is there a configuration or setup option that has changed in 5.0 that will
make this work?

Thanks.

-Tango
-- 
View this message in context: http://www.nabble.com/Durable-Persistant-topics-via-Stomp-on-5.0-snapshot-tf4880188s2354.html#a13965963
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Durable/Persistant topics via Stomp on 5.0 snapshot

Posted by jourzua <jo...@gmail.com>.
Hi

I'm using "persistent" instead of "persist" and it works fine:

 $stomp->send( { destination => '/topic/foo', body => 'test message',
persistent => 'true' } );

and I'm using postgres persistenceAdapter and
apache-activemq-5.0-20071128.111935-4


__Tango wrote:
> 
> Hi folks.  I'm a bit of a newbie to activemq.  I've been trying both the
> 4.1.1 and 5.0 snapshot (20071120.092745).  I was wondering if the method
> for specifying persistant/durable topic publishing or subscribing has
> changed in 5.0.  
> 
> 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.  
> 
> Is there a configuration or setup option that has changed in 5.0 that will
> make this work?
> 
> Thanks.
> 
> -Tango
> 

-- 
View this message in context: http://www.nabble.com/Durable-Persistant-topics-via-Stomp-on-5.0-snapshot-tf4880188s2354.html#a14079800
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Durable/Persistant topics via Stomp on 5.0 snapshot

Posted by __Tango <al...@funkware.com>.
Done.  https://issues.apache.org/activemq/browse/AMQ-1505

Thanks much.

-Tango


James.Strachan wrote:
> 
> That sounds odd! Could you raise a JIRA please to track this issue
> 

-- 
View this message in context: http://www.nabble.com/Durable-Persistant-topics-via-Stomp-on-5.0-snapshot-tf4880188s2354.html#a13972834
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Durable/Persistant topics via Stomp on 5.0 snapshot

Posted by James Strachan <ja...@gmail.com>.
That sounds odd! Could you raise a JIRA please to track this issue

On 27/11/2007, __Tango <al...@funkware.com> wrote:
>
> Hi folks.  I'm a bit of a newbie to activemq.  I've been trying both the
> 4.1.1 and 5.0 snapshot (20071120.092745).  I was wondering if the method for
> specifying persistant/durable topic publishing or subscribing has changed in
> 5.0.
>
> 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.
>
> Is there a configuration or setup option that has changed in 5.0 that will
> make this work?
>
> Thanks.
>
> -Tango
> --
> View this message in context: http://www.nabble.com/Durable-Persistant-topics-via-Stomp-on-5.0-snapshot-tf4880188s2354.html#a13965963
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Re: Durable/Persistant topics via Stomp on 5.0 snapshot

Posted by jourzua <jo...@gmail.com>.
Hi

I'm using "persistent" instead of "persist" and it works fine:

 $stomp->send( { destination => '/topic/foo', body => 'test message',
persistent => 'true' } );

and I'm using postgres persistenceAdapter and
apache-activemq-5.0-20071128.111935-4


__Tango wrote:
> 
> Hi folks.  I'm a bit of a newbie to activemq.  I've been trying both the
> 4.1.1 and 5.0 snapshot (20071120.092745).  I was wondering if the method
> for specifying persistant/durable topic publishing or subscribing has
> changed in 5.0.  
> 
> 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.  
> 
> Is there a configuration or setup option that has changed in 5.0 that will
> make this work?
> 
> Thanks.
> 
> -Tango
> 

-- 
View this message in context: http://www.nabble.com/Durable-Persistant-topics-via-Stomp-on-5.0-snapshot-tf4880188s2354.html#a14079800
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Durable/Persistant topics via Stomp on 5.0 snapshot

Posted by jourzua <jo...@gmail.com>.
Hi

I'm using "persistent" instead of "persist" and it works fine:

 $stomp->send( { destination => '/topic/foo', body => 'test message',
persistent => 'true' } );

and I'm using postgres persistenceAdapter and
apache-activemq-5.0-20071128.111935-4


__Tango wrote:
> 
> Hi folks.  I'm a bit of a newbie to activemq.  I've been trying both the
> 4.1.1 and 5.0 snapshot (20071120.092745).  I was wondering if the method
> for specifying persistant/durable topic publishing or subscribing has
> changed in 5.0.  
> 
> 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.  
> 
> Is there a configuration or setup option that has changed in 5.0 that will
> make this work?
> 
> Thanks.
> 
> -Tango
> 

-- 
View this message in context: http://www.nabble.com/Durable-Persistant-topics-via-Stomp-on-5.0-snapshot-tf4880188s2354.html#a14079800
Sent from the ActiveMQ - User mailing list archive at Nabble.com.