ruby stomp w/activemq, how to get persistent messages?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ruby stomp w/activemq, how to get persistent messages?

andrewk
Got an email on the activeMessaging list about this, and think it might be enough of a stomp/activemq issue to post here as well.


Using activemq 4.2 snapshot, assume default settings:

start activemq
send in a message to a queue using the ruby stomp client.
start up a subscriber to the queue, and it will pick up the message

 - that's good.  The message was there waiting. I like that.

 - Here's the bad case:

start activemq
send in a message to a queue using the ruby stomp client.
stop then start activemq
start up a subscriber to the queue, and it will get NADA

 - Not so good.
I tried sending in a persistent header = 2 on the message, no good.
Is there a way to get this 'bad' case to work that the message is persisted and waiting when activemq restarts and the subscriber connects?



Reply | Threaded
Open this post in threaded view
|

Re: ruby stomp w/activemq, how to get persistent messages?

andrewk
I did more more thorough search, and found the following:

http://www.nabble.com/Composite-Destination-and-Stomp-tf2148666.html#a5939416

so the simple answer is set a header on the send of :persistent => true

andrewk wrote
Got an email on the activeMessaging list about this, and think it might be enough of a stomp/activemq issue to post here as well.


Using activemq 4.2 snapshot, assume default settings:

start activemq
send in a message to a queue using the ruby stomp client.
start up a subscriber to the queue, and it will pick up the message

 - that's good.  The message was there waiting. I like that.

 - Here's the bad case:

start activemq
send in a message to a queue using the ruby stomp client.
stop then start activemq
start up a subscriber to the queue, and it will get NADA

 - Not so good.
I tried sending in a persistent header = 2 on the message, no good.
Is there a way to get this 'bad' case to work that the message is persisted and waiting when activemq restarts and the subscriber connects?


Reply | Threaded
Open this post in threaded view
|

Re: ruby stomp w/activemq, how to get persistent messages?

brianm
Alternately you can make persistent queues the default, or configure a  
policy for just that queue in the activemq configuration.

-Brian

On Feb 2, 2007, at 1:34 PM, andrewk wrote:

>
> I did more more thorough search, and found the following:
>
> http://www.nabble.com/Composite-Destination-and-Stomp-tf2148666.html#a5939416
>
> so the simple answer is set a header on the send of :persistent =>  
> true
>
>
> andrewk wrote:
>>
>> Got an email on the activeMessaging list about this, and think it  
>> might be
>> enough of a stomp/activemq issue to post here as well.
>>
>>
>> Using activemq 4.2 snapshot, assume default settings:
>>
>> start activemq
>> send in a message to a queue using the ruby stomp client.
>> start up a subscriber to the queue, and it will pick up the message
>>
>>  - that's good.  The message was there waiting. I like that.
>>
>>  - Here's the bad case:
>>
>> start activemq
>> send in a message to a queue using the ruby stomp client.
>> stop then start activemq
>> start up a subscriber to the queue, and it will get NADA
>>
>>  - Not so good.
>> I tried sending in a persistent header = 2 on the message, no good.
>> Is there a way to get this 'bad' case to work that the message is
>> persisted and waiting when activemq restarts and the subscriber  
>> connects?
>>
>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/ruby-stomp-w-activemq%2C-how-to-get-persistent-messages--tf3163644.html#a8776082
> Sent from the stomp - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: ruby stomp w/activemq, how to get persistent messages?

andrewk
Hate to sound dumb, but not sure how to do those other 2 options - thought I was trying the right thing, but maybe not.

I tried setting the broker persistent="true" in my xml config, that did not make the messages persist.

I also have in the xml a lastImageSubscriptionRecoveryPolicy for a policyentry wildcarded to all my queues, still no love - I don't get the last message.

What am I missing?

Thanks Brian,

-Andrew





brianm wrote
Alternately you can make persistent queues the default, or configure a  
policy for just that queue in the activemq configuration.

-Brian

On Feb 2, 2007, at 1:34 PM, andrewk wrote:

>
> I did more more thorough search, and found the following:
>
> http://www.nabble.com/Composite-Destination-and-Stomp-tf2148666.html#a5939416
>
> so the simple answer is set a header on the send of :persistent =>  
> true
>
>
> andrewk wrote:
>>
>> Got an email on the activeMessaging list about this, and think it  
>> might be
>> enough of a stomp/activemq issue to post here as well.
>>
>>
>> Using activemq 4.2 snapshot, assume default settings:
>>
>> start activemq
>> send in a message to a queue using the ruby stomp client.
>> start up a subscriber to the queue, and it will pick up the message
>>
>>  - that's good.  The message was there waiting. I like that.
>>
>>  - Here's the bad case:
>>
>> start activemq
>> send in a message to a queue using the ruby stomp client.
>> stop then start activemq
>> start up a subscriber to the queue, and it will get NADA
>>
>>  - Not so good.
>> I tried sending in a persistent header = 2 on the message, no good.
>> Is there a way to get this 'bad' case to work that the message is
>> persisted and waiting when activemq restarts and the subscriber  
>> connects?
>>
>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/ruby-stomp-w-activemq%2C-how-to-get-persistent-messages--tf3163644.html#a8776082
> Sent from the stomp - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email