You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by j0llyr0g3r <ti...@wincor-nixdorf.com> on 2007/10/15 13:27:19 UTC

concurrent usage of a journal and a database?

Hey folks,

i really dont understand the following code-snippet from the original
AMQ-config-file:

    <!-- Use the following if you wish to configure the journal with JDBC
-->
    <!--
    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data"  dataSource="#postgres-ds"/>
    </persistenceAdapter>
    -->

where dataSource="#postgres-ds" would be

  <!-- 
  <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
    <property name="serverName" value="localhost"/>
    <property name="databaseName" value="activemq"/>
    <property name="portNumber" value="0"/>
    <property name="user" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="dataSourceName" value="postgres"/>
    <property name="initialConnections" value="1"/>
    <property name="maxConnections" value="10"/>
  </bean>
  -->

which would be a PostgreSQL-Server.

Why and - more important - how could it be possible to use the
filesystem-based journal AND a database at once?

How does this make sense?

>From what i have, i'd thought that you only can use one at a time?

Could somebody please enlighten me?
-- 
View this message in context: http://www.nabble.com/concurrent-usage-of-a-journal-and-a-database--tf4626576s2354.html#a13210886
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: concurrent usage of a journal and a database?

Posted by James Strachan <ja...@gmail.com>.
On 15/10/2007, j0llyr0g3r <ti...@wincor-nixdorf.com> wrote:
>
> Hey folks,
>
> i really dont understand the following code-snippet from the original
> AMQ-config-file:
>
>     <!-- Use the following if you wish to configure the journal with JDBC
> -->
>     <!--
>     <persistenceAdapter>
>         <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data"  dataSource="#postgres-ds"/>
>     </persistenceAdapter>
>     -->
>
> where dataSource="#postgres-ds" would be
>
>   <!--
>   <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
>     <property name="serverName" value="localhost"/>
>     <property name="databaseName" value="activemq"/>
>     <property name="portNumber" value="0"/>
>     <property name="user" value="activemq"/>
>     <property name="password" value="activemq"/>
>     <property name="dataSourceName" value="postgres"/>
>     <property name="initialConnections" value="1"/>
>     <property name="maxConnections" value="10"/>
>   </bean>
>   -->
>
> which would be a PostgreSQL-Server.
>
> Why and - more important - how could it be possible to use the
> filesystem-based journal AND a database at once?

Using the file system journal is a performance optimisation; its maybe
10-20x faster than just using a database

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

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

Re: concurrent usage of a journal and a database?

Posted by j0llyr0g3r <ti...@wincor-nixdorf.com>.
Ok guys, 

thanks for the explanation....



rajdavies wrote:
> 
> You can use the file based journal and a database together - it can  
> make sense where the database is local to the message broker using it  
> (embedded) - and for 4.x this is the default configuration - using  
> Apache derby as the database.
> 
> 
> 
> 
> cheers,
> 
> Rob
> 
> http://rajdavies.blogspot.com/
> 
> 
> 
> On Oct 15, 2007, at 12:27 PM, j0llyr0g3r wrote:
> 
>>
>> Hey folks,
>>
>> i really dont understand the following code-snippet from the original
>> AMQ-config-file:
>>
>>     <!-- Use the following if you wish to configure the journal  
>> with JDBC
>> -->
>>     <!--
>>     <persistenceAdapter>
>>         <journaledJDBC journalLogFiles="5"
>> dataDirectory="${activemq.base}/activemq-data"   
>> dataSource="#postgres-ds"/>
>>     </persistenceAdapter>
>>     -->
>>
>> where dataSource="#postgres-ds" would be
>>
>>   <!--
>>   <bean id="postgres-ds"  
>> class="org.postgresql.ds.PGPoolingDataSource">
>>     <property name="serverName" value="localhost"/>
>>     <property name="databaseName" value="activemq"/>
>>     <property name="portNumber" value="0"/>
>>     <property name="user" value="activemq"/>
>>     <property name="password" value="activemq"/>
>>     <property name="dataSourceName" value="postgres"/>
>>     <property name="initialConnections" value="1"/>
>>     <property name="maxConnections" value="10"/>
>>   </bean>
>>   -->
>>
>> which would be a PostgreSQL-Server.
>>
>> Why and - more important - how could it be possible to use the
>> filesystem-based journal AND a database at once?
>>
>> How does this make sense?
>>
>> From what i have, i'd thought that you only can use one at a time?
>>
>> Could somebody please enlighten me?
>> -- 
>> View this message in context: http://www.nabble.com/concurrent- 
>> usage-of-a-journal-and-a-database--tf4626576s2354.html#a13210886
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/concurrent-usage-of-a-journal-and-a-database--tf4626576s2354.html#a13214336
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: concurrent usage of a journal and a database?

Posted by Rob Davies <ra...@gmail.com>.
You can use the file based journal and a database together - it can  
make sense where the database is local to the message broker using it  
(embedded) - and for 4.x this is the default configuration - using  
Apache derby as the database.




cheers,

Rob

http://rajdavies.blogspot.com/



On Oct 15, 2007, at 12:27 PM, j0llyr0g3r wrote:

>
> Hey folks,
>
> i really dont understand the following code-snippet from the original
> AMQ-config-file:
>
>     <!-- Use the following if you wish to configure the journal  
> with JDBC
> -->
>     <!--
>     <persistenceAdapter>
>         <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data"   
> dataSource="#postgres-ds"/>
>     </persistenceAdapter>
>     -->
>
> where dataSource="#postgres-ds" would be
>
>   <!--
>   <bean id="postgres-ds"  
> class="org.postgresql.ds.PGPoolingDataSource">
>     <property name="serverName" value="localhost"/>
>     <property name="databaseName" value="activemq"/>
>     <property name="portNumber" value="0"/>
>     <property name="user" value="activemq"/>
>     <property name="password" value="activemq"/>
>     <property name="dataSourceName" value="postgres"/>
>     <property name="initialConnections" value="1"/>
>     <property name="maxConnections" value="10"/>
>   </bean>
>   -->
>
> which would be a PostgreSQL-Server.
>
> Why and - more important - how could it be possible to use the
> filesystem-based journal AND a database at once?
>
> How does this make sense?
>
> From what i have, i'd thought that you only can use one at a time?
>
> Could somebody please enlighten me?
> -- 
> View this message in context: http://www.nabble.com/concurrent- 
> usage-of-a-journal-and-a-database--tf4626576s2354.html#a13210886
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>