You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ripad <da...@innoq.com> on 2016/12/13 13:33:36 UTC

Persist messages in MySQL as text instead of blob

Hi all,

I am using ActiveMQ 5.14.1 and a MySQL 5.7 database to persist messages. I
want to change the type of the MSG column in the ACTIVEMQ_MSGS table from
BLOB to some sort of text like TEXT or VARCHAR. But setting the
binaryDataType in the configuration of my persistence adapter (see the XML
snippet below) has no effect - when ActiveMQ recreates the ACTIVEMQ_MSGS
table, the MSG column is still of type BLOB.

This is my current persistence adapter configuration:

<persistenceAdapter>
            <jdbcPersistenceAdapter dataSource="#mysql-ds"
createTablesOnStartup="true">
                <statements>
                    <statements binaryDataType="TEXT"/>
                </statements>
            </jdbcPersistenceAdapter>
        </persistenceAdapter>

How can I change the type of the MSG column?




--
View this message in context: http://activemq.2283324.n4.nabble.com/Persist-messages-in-MySQL-as-text-instead-of-blob-tp4720250.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Persist messages in MySQL as text instead of blob

Posted by Matt Pavlovich <ma...@gmail.com>.
+1


On 12/13/16 9:41 AM, mlange wrote:
> Why would you want this?
> What should happen to various types of encoding? Is everything UTF-8? Or
> ISO-8859-15 ...? Is your database configured according to what _all_
> messages will have as their codepage?
>
> Apart from having a database being discouraged, changing this datatype is
> far more dangerous. I would highly discourage you to walk this path.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Persist-messages-in-MySQL-as-text-instead-of-blob-tp4720250p4720261.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persist messages in MySQL as text instead of blob

Posted by mlange <ml...@anwb.nl>.
Why would you want this?
What should happen to various types of encoding? Is everything UTF-8? Or
ISO-8859-15 ...? Is your database configured according to what _all_
messages will have as their codepage?

Apart from having a database being discouraged, changing this datatype is
far more dangerous. I would highly discourage you to walk this path.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Persist-messages-in-MySQL-as-text-instead-of-blob-tp4720250p4720261.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.