You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Lok Yu <du...@yahoo.com.hk> on 2007/01/11 09:14:05 UTC

how to set the message of the broker will store in the mySQL only

Dear experts,

I have tried to use the config.xml for the broker like that

<persistenceAdapter>
		<jdbcPersistenceAdapter dataSource="#mysql-ds"/>
</persistenceAdapter>

AND ALSO

<persistenceAdapter>
		<journaledJDBC useJournal="false" dataSource="#mysql-ds"/>
</persistenceAdapter>

but i discover that when i deleted all the data which haven't publishws to
the client in the activemq_msgs table in the broker, however, when i start
the client connection to the broker, it can still receive the message from
broker.

can i switch the broker to the mode that message in the broker would only
store in the database but not elsewhere. 

Thanks for answering.
-- 
View this message in context: http://www.nabble.com/how-to-set-the-message-of-the-broker-will-store-in-the-mySQL-only-tf2957449.html#a8273313
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: how to set the message of the broker will store in the mySQL only

Posted by James Strachan <ja...@gmail.com>.
On 1/12/07, Lok Yu <du...@yahoo.com.hk> wrote:
>
> i am using the "delete from activemq_msgs" for deleting the record from the
> database.
> and i found that the activemq_msgs would become empty, however, once restart
> the client, it can still retrieve the data from the broker.

You have to take down the broker while you are doing that SQL as the
broker will cache messages

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: how to set the message of the broker will store in the mySQL only

Posted by Lok Yu <du...@yahoo.com.hk>.
i am using the "delete from activemq_msgs" for deleting the record from the
database.
and i found that the activemq_msgs would become empty, however, once restart
the client, it can still retrieve the data from the broker.



James.Strachan wrote:
> 
> To store just in the database and not in the journal then use
> <jdbcPersistenceAdapter/>.
> 
> I don't really understand what SQL operations you carried out so can't
> really vouch for what that would have done - to prune a queue I'd
> recommend using the MBeans / JConsole instead.
> 
> On 1/11/07, Lok Yu <du...@yahoo.com.hk> wrote:
>>
>> Dear experts,
>>
>> I have tried to use the config.xml for the broker like that
>>
>> <persistenceAdapter>
>>                 <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
>> </persistenceAdapter>
>>
>> AND ALSO
>>
>> <persistenceAdapter>
>>                 <journaledJDBC useJournal="false"
>> dataSource="#mysql-ds"/>
>> </persistenceAdapter>
>>
>> but i discover that when i deleted all the data which haven't publishws
>> to
>> the client in the activemq_msgs table in the broker, however, when i
>> start
>> the client connection to the broker, it can still receive the message
>> from
>> broker.
>>
>> can i switch the broker to the mode that message in the broker would only
>> store in the database but not elsewhere.
>>
>> Thanks for answering.
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-set-the-message-of-the-broker-will-store-in-the-mySQL-only-tf2957449.html#a8273313
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-set-the-message-of-the-broker-will-store-in-the-mySQL-only-tf2957449.html#a8290674
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: how to set the message of the broker will store in the mySQL only

Posted by James Strachan <ja...@gmail.com>.
To store just in the database and not in the journal then use
<jdbcPersistenceAdapter/>.

I don't really understand what SQL operations you carried out so can't
really vouch for what that would have done - to prune a queue I'd
recommend using the MBeans / JConsole instead.

On 1/11/07, Lok Yu <du...@yahoo.com.hk> wrote:
>
> Dear experts,
>
> I have tried to use the config.xml for the broker like that
>
> <persistenceAdapter>
>                 <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
> </persistenceAdapter>
>
> AND ALSO
>
> <persistenceAdapter>
>                 <journaledJDBC useJournal="false" dataSource="#mysql-ds"/>
> </persistenceAdapter>
>
> but i discover that when i deleted all the data which haven't publishws to
> the client in the activemq_msgs table in the broker, however, when i start
> the client connection to the broker, it can still receive the message from
> broker.
>
> can i switch the broker to the mode that message in the broker would only
> store in the database but not elsewhere.
>
> Thanks for answering.
> --
> View this message in context: http://www.nabble.com/how-to-set-the-message-of-the-broker-will-store-in-the-mySQL-only-tf2957449.html#a8273313
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/