Search code examples
wildfly-10activemq-artemis

WildFly 10.1 Failed to create journal-datasource to store message


I'm using an old version of WildFly (10.1) which uses the ActiveMQ Artemis that comes with it, and I was trying to switch the store method from a store in the file system to store in the database (and I know that the ActiveMQ Artemis default way to store the is better).

So I'm using this configuration for ActiveMQ Artemis:

<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
     <server name="default">
        <security-setting name="#">
            <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
        </security-setting>
        <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
        <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
        <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
            <param name="batch-delay" value="50"/>
        </http-connector>
        <in-vm-connector name="in-vm" server-id="0"/>
        <http-acceptor name="http-acceptor" http-listener="default"/>
        <http-acceptor name="http-acceptor-throughput" http-listener="default">
            <param name="batch-delay" value="50"/>
            <param name="direct-deliver" value="false"/>
        </http-acceptor>
        <in-vm-acceptor name="in-vm" server-id="0"/>
        <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
        <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
        <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
        <connection-factory name="RemoteConnectionFactory" connectors="http-connector" entries="java:jboss/exported/jms/RemoteConnectionFactory"/>
        <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
    </server>
</subsystem>

and than using jboss-cli.bat (I'm using Windows), I run this command:

/subsystem=messaging-activemq/server=vmvanz:write-attribute(name=journal-datasource, value=ExampleDS)

And I get this error:

{
"outcome" => "failed",
"failure-description" => "WFLYCTL0201: Unknown attribute 'journal-datasource'",
"rolled-back" => true
}

I try the same command in WildFly 14 and work. I read the documentation from 10.1 and it show the same command line.

Does someone knows if this is a problem from this version or know some other way to configure?


Solution

  • WildFly 10.1 doesn't support the journal-datasource attribute. It ships with version 1.0 of the ActiveMQ messaging configuration schema. This is specified in your configuration here:

    <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
    

    The journal-datasource attribute wasn't available until version 2.0 of the ActiveMQ messaging configuration schema which first appeared in WildFly 11.

    Also, the documentation you linked is for WildFly 13. This is visible in the URL:

    https://docs.wildfly.org/13/Admin_Guide.html#Messaging_JDBC_Store_for_Messaging_Journal