Sequential message processing in JBOSS EAP 7 - jboss

I deployed my message driven beans in JBoss and my queues are in IBM web sphere. I am using resource adapter to consume messages from IBM queues.
If i push 100 messages in queue, application server J boss executing parallel those messages.
But i want to execute sequentially one by one message.
Is there any configuration i need to change. Please help.
below i mentioned IBM application server vs JBoss application server processing.
IBM application server processing model
Message 1 processing started
.
.
.
Message 1 processing completed
Message 2 processing started
.
.
.
.Message 2 processing completed
JBOSS EAP & application server processing model
Message 1 processing started
Message 2 processing started
Message 1 processing completed
Message 2 processing completed

you need to change pool settings to get sequential processing. refer below link for more info.
https://developer.jboss.org/thread/242170

Related

How to make messages in a topic in weblogic server first in first out

I am using Oracle Fusion Middleware 12.1.3. Weblogic Server 12.1.3 and OSB 12.1.3.
I have created 1 connection factory and one topic. I have one producer sending messages to the topic and 3 consumers(subscribers)
I have also set redelivery failure settings (retry 3 times every half hour) in case there is a connection error or network issue the messages will be written back to the topic and will be retried.
but I want to make sure that the messages are retried in the same order that it was received.
i.e. for example there are 3 messages in the topic (message 1, message 2, message 3) and one of the subscriber is not able to consume the message so the message is pending in the topic and it will be retried.
but I want it to be retried in same order i.e. message 1, message2 and message 3.
Is there any specific setting to be done in weblogic or OSB to achieve this behavior
Have you tried using the weblogic-specific Unit of Order feature?
What Is Message Unit-Of-Order?
Message Unit-of-Order is a WebLogic Server value-added feature that enables a stand-alone message producer, or a group of producers acting as one, to group messages into a single unit with respect to the processing order. This single unit is called a Unit-of-Order and requires that all messages from that unit be processed sequentially in the order they were created.
You can configure it programmatically for more control, or administratively (via WLS console, attaching one to connection factories etc) if you don't have control over the messages produced.
For more info about how to attach the JMS headers to enable it, you might find this site helpful.

Weblogic 12c - Suddenly JMS Server stopped processing messages

Team,
We are facing a strange issue in our webservice application.
It has 6 weblogic managed instances (4 # m01,m02,m04,m05 - handles webservice requests which post the messages to JMS queues, 2 # m03,m06 - JMS instances which have MDB components which actually process the messages from queue).
We have observed one of the JMS instance (M06) is stopped processing messages all of sudden without any errors in the application or server logs. We observed the connection factory is not responding. This also causing hogging threads in service instances while posting the and searching the messages from the JMS queues. We are not able to see any issue from the thread dumps as well.
Adding to this when we try to stop the M06 instance it is not going down, eventually we had to kill the instance process and start the instance to resolve the issue. Then it is working fine for few days then again issue resurfacing.
We are using weblogic 12c.
Any one had faced this kind of issue earlier. Or any one have any idea what could have went wrong. Your inputs are greatly appreciated.
If I'll be you, I'll start by creating error queue, to get rid of any "poisoned" messages. More information can be found here: http://middlewaremagic.com/weblogic/?p=4670. Then try to check error queue and message content there.
Secondly, try to turn off mentioned instance (M06) at all, if bottleneck/errors does not appear on some other node, check M06 instance configuration and compare it with other nodes -> issue will be definitely somewhere there.

JBOSS messaging replicated queue

I am using JBOSS messaging in the following way:
1) Two JBOSS instances using 'all' config (i.e. clustered config)
2) One replicated queue created on each JBOSS instance wiht same JNDI name (clustered = true)
3) one producer attach locally to the queue on each instance (i.e. both the producer on both the nodes keep on adding messages to this replicated queue)
4) One JBOSS instance is marked as "consumer node" and queue message consumer is started on only this node (i.e. messages will be consumed on only one node). There is a logic which will decide which JBOSS instance is marked as "consumer node"
5) PostOffice used is clustered
6) server peer configured to not enforce message sequencing.
7) produced messages are non-persistent (deliveryMode = NON_PERSISTENT)
But I am facing problem with this. Messages produced on "non consumer node" do not get replicated to the queue on the "consumer node" and hence not available for consumption.
I enabled the logging and checked that postoffice finds two queues but only delivers to the local queue as it discovers that the remote queue is recoverable.
Any idea how to set it working?
FYI: I believe a message can be delivered to only one queue (local or remote). So, I want only one queue which is distributed but I am currently getting 2 different distributed queues (however their JNDI name is same). Is this a problem? If yes, how to solve this? Weblogic provides the option of creating a queue on admin server and thus a shared queue is possible there. What is the similar mechanism in JBOSS messaging? Or should I need to approach this problem as 2 queues which are synchronized. If yes, then how to achieve synchronization between them?
Thanks for taking out sometime to help me!!
Regards

How can we have JBOSS MDB retry its connection if it fails at startup?

We have a server app that is deployed across to server machines, each running JBOSS 4.2.2. We use JBOSS messaging with MDBs to communicate between the systems. Currently we need to start the servers in a very specific order so that JBOSS can connect properly. If a server starts and doesn't see its resources it never tries again. This is problematic and time consuming in testing when we're bouncing servers constantly. We believe that if we could specify a retry flag in JBOSS could reattempt to get the connection.
Is there a flag/config option in JBOSS that would reattempt to obtain JMS connections on failure at startup?
I am quite new to the JMS technology, so it is entirely possible that I have mixed up some terms here. Since this capability is to be used in house experimental or deprecated options are acceptable.
Edit: The problem is that a consumer starts up with no producer available and subsequently fails, never to try again. If a consumer and producer are up and the producer dies the consumer will retry for the producer to come back.
I'm 95% sure that JBoss MDBs do retry connections like that. If your MDBs are not receiving messages as you expect, I think something else is wrong. Do the MDBs depend on any other resources. Perhaps posting your EJB descriptors (META-IF/ejb-jar.xml and META-IF/jboss.xml) would help.

Delaying JMS messages in queue when starting JBoss

Is there a way to tell JMS in JBoss to delay processing of messages already in the persistent queue for a while, e.g. 2 minutes, while JBoss starts.
As it is right now, when we restart JBoss, JMS starts to dispatch messages to the MessagesListeners even before JBoss has started properly.
We're running JBoss 4.2.3
I have found an annotation called Depends where an ejb or other service can list what you depend on:
http://docs.jboss.org/ejb3/docs/reference/build/reference/en/html/jboss_extensions.html
To actually start an ejb when ther server is up and listening this works best:
http://community.jboss.org/wiki/BarrierController