Weblogic JMS Exception 055167 “cannot support more than one synchronous message-prefetching consumer.”

Question!

What does it mean?

I inherited a complex Java library with a failing integration test. The library uses a general publish/subscribe paradigm, but I must confess I'm pretty inexperienced when it comes to any of this Weblogic/JMS/Spring stuff. The test application runs on one server and invokes Java from C++ via JNI, and launches a child publisher process via fork (that publishes via JNI/Java). THe main app is configured via Spring, and communicates with Weblogic JMS installed on another server (the Weblogic JMS server is controlled by another group on our project). I managed to turn on spring jms debugging, which has been somewhat helpful. So my log file is showing me a sequence of events like this:

(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: [email protected]
...
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Found cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: [email protected]
...
(My App) Publishing...
org.springframework.jms.connection.CachingConnectionFactory Found cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]: [email protected]
...
(My App) Subscribing to DataTest2
org.springframework.jndi.JndiTemplate Looking up JNDI object with name [DataTest2]
(My App) Launching publisher process...
org.springframework.jms.support.destination.JndiDestinationResolver Located object with JNDI name [DataTest2]
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageConsumer for destination [MY-JMS-Module!DataTest2]: [email protected]

(My App) Publishing....
org.springframework.jms.connection.CachingConnectionFactory Creating cached JMS MessageProducer for destination [MY-JMS-Module!DataTest2]
...
WARN 2011-11-14 22:01:00,421 org.springframework.jms.listener.DefaultMessageListenerContainer Setup of JMS message listener invoker failed for destination 'DataTest2' - trying to recover. Cause: [JMSClientExceptions:055167]Single session cannot support more than one synchronous message-prefetching consumer.

java.lang.UnsupportedOperationException: [JMSClientExceptions:055167]Single session cannot support more than one synchronous message-prefetching consumer.
    at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:587)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
    at org.springframework.jms.connection.CachedMessageConsumer.receive(CachedMessageConsumer.java:74)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:429)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:310)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
    at java.lang.Thread.run(Thread.java:636)

I sure wish I had access to the Weblogic JMS source code to run down that exception right about now. Any help or advice would be appreciated. Like I said, the code is kind of complex, so I'm not sure I can provide much more info than my truncated log snipped above, without turning this into a novel.



Answers

TL;DR version

Try disabling Message Prefetch for one of the JMS Connection Factories within Weblogic Admin Console.

Long Version

Hope this helps since I'm not fully familiar with this aspect of Weblogic.

The Basic Primer is this flowchart from the Oracle docs.

The log messages you have show the basic stuff happening as far as looking up the Connection Factory JNDI, Creating a Connection, Creating a Session from that Connection, Look up the destination JNDI, Registering the Consumers and Producers goes.

It seems to be failing after that when it realizes that there are more than one consumer with prefetching enabled.

This prefetch is a property of the Synchronous Consumer which enables prefetching batches of messages to improve performance. See the Sec titled "Using the Prefetch Mode to Create a Synchronous Message Pipeline"

From the Admin Console, Try setting "Prefetch Mode for Synchronous Consumer" this to Disabled

The other docs I came across are the Error Code explanation

BEA-055167 Error: Single session cannot support more than one synchronous message-prefetching consumer.

Description

Single session cannot support more than one synchronous message-prefetching consumer.

Cause - There is another opened synchronous message-prefetching consumer.

Action - Close the another synchronous message-prefetching consumer.

By : JoseK


This video can help you solving your question :)
By: admin