Hi
I'm looking for support in setting up a Wildfly configuration supporting active/passive configuration with JMS messaging.
I found the following example in your quickstarts which is the base for our attempts
https://github.com/wildfly/quickstart/tree/24.x/messaging-clustering-singleton.
Basically the application works fine, I can start both servers, one becomes active and is handle the generated messages.
If I kill the active server, the second server becomes active and is processing the newly generated messages.
I then modified the example so processing a message takes 5 seconds and that only one thread can process the messages in parallel,
so if I access /HelloWorldMDBServletClient, it takes 25 seconds until all messages have been processed by the active server.
I test now the following scenario:
1) Start-up server-1 (becomes active)
2) Start-up server-2 (becomes passive)
3) Generate JMS messages 1-5 by executing the HelloWorldMDBServletClient request
4) Server-1 starts processing the messages, taking 5 seconds for each
5) I kill server-1 after it has processed 1 message, so 4 are still remaining
6) I can see the console that server-2 now becomes active, however the 4 remaining messages are not processed by server-2
7) I generate a new bunch of JMS messages 6-10 by executing the HelloWorldMDBServletClient request, which are processed by server-2
8) I restart server-1 and now the 4 remaining messages are sent to server-2 and processed there
As consequence the messages are 2-5 are not processed until server-1 is restarted which is not acceptable.
I then tried
https://www.mastertheboss.com/jbossas/jboss-jms/jms-clustering-in-wildfly-and-jboss-eap/but I was not able to make this work, as it seems that I cannot deploy to the passive server.
I also found several similar questions in the public forum, e.g.
https://groups.google.com/g/wildfly/c/qy-9xC6Llwc/m/Rx82cEf5BgAJ which links to
https://developer.jboss.org/thread/274961but no concrete advice how to implement it with a current version.
Question:
How to configure messaging correctly that queued messages are processed by another server if the old active server goes down
using the integrated ActiveMQ server (i.e. having just the 2 Wildfly servers).
Is there a working example?
Many Thanks!
Thomas