You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Qwerty777 <ic...@gmail.com> on 2008/07/07 20:47:19 UTC

ActiveMQ's default persistance is not transactional for me

Hello,

I currently have ActiveMQ with MySQL for message persistence installed on
machine X. On machine Y, I have a service running that uses Jencks to allow
the persistence of its own data to DB and message sending to machine X to
happen in a single transaction. It all works well.

I switched *just* the ActiveMQ's message persistence to use ActiveMQ's
default persistence mechanism, from using MySQL. With that change, the
message sending and the DB storage on machine Y no longer are transactional.

I looked around the forum a bit but could not find a similar post to this.

I'm using ActiveMQ 5.1.

Thanks!
Koichi
-- 
View this message in context: http://www.nabble.com/ActiveMQ%27s-default-persistance-is-not-transactional-for-me-tp18323811p18323811.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ's default persistance is not transactional for me

Posted by Qwerty777 <ic...@gmail.com>.
You mean, describe what I do that causes this? Or the specific code/files
that does this? I can describe the scenario for sure, tho I cannot do the
latter.

1. Service X will store data into DB, and will send a message to ActiveMQ.
2. ActiveMQ on machine Y receives the message, and processes it, and sends
the message out.
3. Service X will receive that message, processed on machine Y, and do some
processing on it.
4. Service X will finally try to commit the data originally stored into the
DB in step 1.

What should've happened is the following:
1. Service X will store data into DB, and will send a message to ActiveMQ.
2. Once sending the message is successful, it will commit the data to the
DB, and make the message receivable by the listeners on the queue.
3. ActiveMQ on machine Y receives the message, and processes it, and sends
the message out.
4. Service X will receive that message, processed on machine Y, and do some
processing on it.

For some reason, when I use MySQL as the message persistence using Jencks to
make DB store and message sending transactional, it all works well as
expected. But when I *only* switch the message persistence mechanism within
ActiveMQ's config, it starts to behave wrongly.

Koichi


rajdavies wrote:
> 
> could you supply a test case ?
> On 7 Jul 2008, at 19:47, Qwerty777 wrote:
> 
>>
>> Hello,
>>
>> I currently have ActiveMQ with MySQL for message persistence  
>> installed on
>> machine X. On machine Y, I have a service running that uses Jencks  
>> to allow
>> the persistence of its own data to DB and message sending to machine  
>> X to
>> happen in a single transaction. It all works well.
>>
>> I switched *just* the ActiveMQ's message persistence to use ActiveMQ's
>> default persistence mechanism, from using MySQL. With that change, the
>> message sending and the DB storage on machine Y no longer are  
>> transactional.
>>
>> I looked around the forum a bit but could not find a similar post to  
>> this.
>>
>> I'm using ActiveMQ 5.1.
>>
>> Thanks!
>> Koichi
>> -- 
>> View this message in context:
>> http://www.nabble.com/ActiveMQ%27s-default-persistance-is-not-transactional-for-me-tp18323811p18323811.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ%27s-default-persistance-is-not-transactional-for-me-tp18323811p18325615.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ's default persistance is not transactional for me

Posted by Rob Davies <ra...@gmail.com>.
could you supply a test case ?
On 7 Jul 2008, at 19:47, Qwerty777 wrote:

>
> Hello,
>
> I currently have ActiveMQ with MySQL for message persistence  
> installed on
> machine X. On machine Y, I have a service running that uses Jencks  
> to allow
> the persistence of its own data to DB and message sending to machine  
> X to
> happen in a single transaction. It all works well.
>
> I switched *just* the ActiveMQ's message persistence to use ActiveMQ's
> default persistence mechanism, from using MySQL. With that change, the
> message sending and the DB storage on machine Y no longer are  
> transactional.
>
> I looked around the forum a bit but could not find a similar post to  
> this.
>
> I'm using ActiveMQ 5.1.
>
> Thanks!
> Koichi
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ%27s-default-persistance-is-not-transactional-for-me-tp18323811p18323811.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>