Configuring wildfly with disaster recovery mirror for JMS

155 views
Skip to first unread message

Stephen Baker

unread,
Mar 8, 2021, 2:57:40 PM3/8/21
to WildFly

Hello,

We have a data centre on the east and west coast of the US, at any particular time one is live and the other is on standby in the event that we lose an entire site, and periodically just to prove things are working we fail over from one site to the other.

Our jboss/wildfly instances are deployed with an in house system that is conceptually similar to docker - where one click brings up an instance of wildfly bundled with our software and the whole bundle is blown away for each deployment except a set of mapped volumes. I'm not sure if that's relevant.

When I asked around about how to accomplish the replication in artemis I was pointed to the artemis documentation on broker-connections and mirroring in particular[1], which seems to be exactly what I want.

I haven't been able to figure out how to either a. configure mirroring for the embedded artemis in the wildfly configuration xml; or to transparently use a standalone artemis instance. I've been stuck on this for quite a few days now, so any assistance, or other recommendations, would be much appreciated.

Stephen Baker

unread,
Mar 9, 2021, 5:18:42 PM3/9/21
to WildFly
I've switched to using remote artemis, but I'm seeing an error on my JMS connections:

javax.jms.JMSException: AMQ159007: Invalid Session Mode SESSION_TRANSACTED, to enable Local Transacted Sessions you can set the allowLocalTransactions (allow-local-transactions) on the resource adapter
        at org.apache.acti...@2.10.1//org.apache.activemq.artemis.ra.ActiveMQRASessionFactoryImpl.allocateConnection(ActiveMQRASessionFactoryImpl.java:847)
        at org.apache.acti...@2.10.1//org.apache.activemq.artemis.ra.ActiveMQRASessionFactoryImpl.createQueueSession(ActiveMQRASessionFactoryImpl.java:297)
        at rave-messaging-jms3-impl//com.raveu.messaging.jms3.impl.unsafe.ThreadUnsafeJmsConnectionImpl.createSession(ThreadUnsafeJmsConnectionImpl.java:31)

My configuration looks like:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:11.0">
          <remote-connector name="remote-artemis" socket-binding="remote-artemis"/>
          <connection-factory name="artemis" connectors="remote-artemis" entries="java:/ConnectionFactory"/>
          <pooled-connection-factory name="activemq-ra"
                                   entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory"
                                   connectors="remote-artemis"
                                   transaction="xa"
                                   user="artemis"
                                   password="artemis"/>
</subsystem>

The error message looks helpful but I'm not quite sure what it's trying to tell me, or where SESSION_TRASACTED is coming from.

Stephen Baker

unread,
Mar 9, 2021, 9:42:51 PM3/9/21
to WildFly
I may have solved my own problem with `factory-type="XA_QUEUE"` on the connection-factory. At least the errors I'm getting now are about the queues not existing, not in session creation. Obviously more testing is needed since I don't really know what I'm doing.

Emmanuel Hugonnet

unread,
Mar 10, 2021, 6:54:07 AM3/10/21
to Stephen Baker, WildFly
You should define the jms queues in the subsystem so they would be created when it starts.
Cheers,
Emmanuel
> <https://activemq.apache.org/components/artemis/documentation/latest/amqp-broker-connections.html#mirror>
>
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com
> <mailto:wildfly+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/857ff185-f03c-43cb-a35b-3da497c89332n%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/857ff185-f03c-43cb-a35b-3da497c89332n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages