Creating a JMS queue on WildFly 8.2 (with JMS provider HornetQ), and having a message driven bean "activated" by this queue, I saw that if the producer sends, in a rapid succession, multiple messages to the queue, the message driven bean does not process them necessarily in the order in which they were sent. Can one configure WildFly so that the messages are processed in the order in which they are sent (first in first out)?
Is there a way to make the message queue processing by MDB, on WildFly, FIFO?
1.1k Views Asked by John Donn At
1
There are 1 best solutions below
Related Questions in JMS
- Using selector with JMSMessageID always returns null
- Put JMS message properties in IBM MQ queue and access from other JMS client which run on Websphere liberty
- How to browse ActiveMQ queue using JMS selector when number of messages in queue is > 100K
- How to tell if a JMS Session is async
- ActiveMQ Artemis - Get current redelivery count for scheduled messages
- Valid value usage in JMeter's JMS Subscriber 'JMS Selector' property - in order to consume messages with a dynamically changing JMSCorrelationID
- Setting the Maximum Message Size for JMS Destinations in Payara
- ActiveMQ Artemis HA split-brain issue on OOME crash
- JMeter JMS Publisher: Getting the JMSMessageId (generated at runtime) in the header and using it as the value of another JMS Property before publish
- ActiveMQ Artemis: Muticast address deliver messages inconsistently
- ActiveMQ Artemis Consumer Connection Distribution
- ActiveMQ Artemis server produces lots of AMQ224016 error in logs after migration to Jakarta API client
- How to create a JMS queue with topic in Docker Compose?
- jakarta.jms.JMSException: Failed to build body from content. Serializable class not available to broker
- How do i stop @JmsListener from listening a queue using JmsListenerEndpointRegistry in spring boot?
Related Questions in WILDFLY
- what are the benefits of deploying a spring boot application on an application server?
- What's the point of deploying spring boot application on an application server like Wildfly?
- Keycloak 15.0.1 failed to start because of missing library
- JBoss Wildfly 17 server not accessible via the hosting laptop's IP address
- Facing [io.undertow.request.io] (default task-4) Exception handling request to /business-central/: java.io.IOException: UT010029: Stream is closed
- How to get the current number of in-use bean instances (MDB) from Wildfly?
- Wildfly runs properly but wars Faile
- Retreiving a deployment from Wildfly using Docker and Uploading into Nexus
- Deployment Discrepancy: .war File Deployment from Nexus to Wildfly via Docker Image
- Problem configuring messaging-activemq in bootable wildfly 25
- How to set a reverse proxy with Undertow
- Attempting to start WildFly 10 causing a InvocationTargetException
- I want to access a password stored in a elytron credential store using system properties in jboss eap 7.4 version
- WildFly primefaces Fileupload customization (Encrypted tempFile)
- Error deploying .war from Nexus to Wildfly 29.0.1.Final via Docker
Related Questions in JBOSS-MDB
- JMS Message Router - variables (int and double) processing
- Java Message Driven Bean Override
- Message Driven bean, is not fetching the new emails based on polling interval
- ResourceAdapter already set | JBoss 5.2 with Active MQ
- JMS Queue listener and publisher using MDB in jboss using java
- JBoss EAP 7.1: ActiveMQ configuration - MDB with properties JMS not consuming message
- Facing issue while Configuring MDB and MQ in jboss 7.1
- MessageListener stops listening to HornetQ Queue
- JMS 2 MDB on Wildfly 10 with activeMQ
- In Wildfly 10, can the MDB lookup properties be specified in the standalone-full.xml rather than be bound at compile time in the Java source code?
- MessageDrivenBean isnt handle messages [Wildfly]
- MDB onMessage fails with closed JDBC connection
- Mdb with oracle AQ in jboss jboss-eap-7
- how to make serial process using MDB and activemq in java
- Set maxsession for MDB through ejb-jar.xml in JBoss
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
(I think to have understood what happens after reading https://stackoverflow.com/a/6744508/999264)
There are multiple threads which execute the
onMessagemethod of the message driven bean (MDB), one thread per message, and thus, if multiple messages arrive almost simultaneously, one cannot know which message will be processed first (because one cannot know which one of the threads will finishonMessageexecution first). The only way to know this is to make sure that the number of threads is 1: in this case the only thread first processes the first message, then the second one, and so on.In WildFly and JBoss the annotation
@MessageDrivenhas the "activation config property"maxSession, which, as I understand, controls the maximal number of threads used to process the messages which arrive from the queue to the MDB. Setting its value to 1, as belowand running the code, I see that indeed the messages are being processed, by the message driven bean, in the order in which they were sent.
I changed the title of the question since the original title, "Is there a way to make the message queue on WildFly FIFO?", appears incorrect: the queue itself is FIFO (actually, I found written somewhere that this is a part of JMS spec, though I cannot pinpoint the exact place).