2 Replies Latest reply on Aug 2, 2018 9:10 AM by bpogace

    Wildfly 13 - Missing JMS messages using a JDBC storage for ActiveMQ


      Hi everyone,

      I have been trying a configuration where there are two Wildfly servers (different machines) in a singleton deployment cluster, and the JMS messages are configured to be saved in a connected database through the simple configuration:

      <journal datasource="ourdatasourcename" 


      The deployed application (same for both servers) contains a page where the messages already present in the queue can be viewed and some consumers can be connected to the application and retrieve these messages.


      I have been testing to see how the deployments behave when failover occurs and in certain occasions I cannot understand why some messages are lost between servers.


      To be more clear, normally the user publishes a message in the queue (through the application) and it remains there indefinitely until a consumer connects to the queue and retrieves the message. This consumer is a process that normally is connected to the server listening for new messages he can retrieve. In this case, as soon as a message is published in the queue, it will take only a couple of seconds (1-5 sec) to the consumer to retrieve the message. Since this happens it suggests that the messages are being persisted for a shorter period of time.
      Unfortunately though, when simulating a failover (by killing the active server processes) around 15 seconds after one or more messages are published, the messages are not found by the second Server. If this is done after say 30 seconds, the messages are viewed also through the second Server (the first one being still down).

      This is very odd, so I wanted to ask what's going on here and how are the messages persisted on the database in this scenario. Or it could also be that there is a configuration missing on my side.
      I'd like your feedback on this, thanks.

      Best regards,