• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Pending Messages - Urgent help!!!!

Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Need to have some clarification on the JMS acknowledge-mode and transactions.
In my application I have a MDB (has conatainer managed transaction )which publishes to a topic ( say TOPIC-A ).
Here is the code i am using to publish:
connection = factory.createTopicConnection();
session = ( TopicSession ) connection.createTopicSession( true, Session.AUTO_ACKNOWLEDGE );
publisher = session.createPublisher( topic );
message = session.createTextMessage();
message.setText( requestXML );

There are 2 subscribers of this topic:

1) MDB (which also has container managed transaction )
it uses following code to publish message to supplier destination queue

_connection = _factory.createQueueConnection();
session = (QueueSession) _connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
sender = session.createSender( _queue );
message = session.createTextMessage();
String messageID = message.getJMSMessageID().substring(3);


2) JMS Subscriber uses the following code to receive the message:
_tConnection = _topicConFactory.createTopicConnection();

TopicSession tSession = _tConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicSubscriber tSubscriber = tSession.createDurableSubscriber( _topic,"gatewaySubscriber" );

tSubscriber.setMessageListener( msgLsnr );

I am using weblogic 8.1. When I look in weblogic console for the details for TOPIC-A, it increments the 'Message Pending' everytime I send a message, although i can see all the messages being consumed and none is lost. And as per BEA
Pending means the message could have been:
* sent in a transaction but not committed.
* received and not acknowledged.
* received and not committed.
* subject to a redelivery delay (as of WebLogic JMS 6.1 or later).
* subject to a delivery time (as of WebLogic JMS 6.1 or later).
Well I don't think any of the above mentioned condition is happening in my case. Can anybody shed some light on why it is happening.
Do not set lab on fire. Or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic