ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » UNCOM status on MQ

Post new topic  Reply to topic
 UNCOM status on MQ « View previous topic :: View next topic » 
Author Message
kaushik
PostPosted: Wed Nov 21, 2007 12:11 pm    Post subject: UNCOM status on MQ Reply with quote

Newbie

Joined: 21 Nov 2007
Posts: 5

Hi,
I have a spring based application implementing DefaultMssageListenerContainer and some MDP's listening to messages on IBM websphere MQ 6.

We have set the acknowledgment mode to Client-Acknowledge in container and set the Backout threshold to 3 when we created MQ queues so that the messages are retried maximum 3 times.

I have also set BOQNAME to an error queue where messages should be moved after 3 failed tries.

The weired problem I am having is the MQ status shows UNCOM status (uncommited messages) whenever I throw a runtime exception in my onMessage event.

After this it stays UNCOM state until my program exits or after few hours of last message activity (and provided last message was processed correctly- no runtimeexception)

Additionally, while status is UNCOM- other threads cannot browse messages on DATA/ error queues which happens for even those messages which were not in UNCOM state on the queues.

And most interesting is the problem that after my program shuts down- the failed messages (which were present on ERROR queue in UNCOM state) are moved to DATA queue if the last message also threw an exception, or stay on ERROR queue (Expected behaviour) if the last message was processed correctly.

Could someone help me understand whats going on here?
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Nov 21, 2007 12:40 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I'm not sure what your append has to do with the previous ones. However, your problem sounds like you aren't actually commiting or rolling back your UOW.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kaushik
PostPosted: Wed Nov 21, 2007 12:46 pm    Post subject: Reply with quote

Newbie

Joined: 21 Nov 2007
Posts: 5

Hi Bower,
I had to append as i was not able to create a new thread.

Yes agree that something is not commiting or rolling back at the end of each message.
What that could be.
i use XA transaction, transport type = client, I do a session.commit() each time in my application code.

is there anything in the Webspehere factory configuration settings that could be wrong.

or could there be something related to transaction where the Queues are created (my admin told me they are plain local queues and no transaction settings specified- just BOQNAME and BOTHRESH)
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 22, 2007 8:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kaushik wrote:
i use XA transaction, transport type = client, I do a session.commit() each time in my application code.


You can't use XA transactions with a standard client. You have to use the ETC, which is a separate piece of rather expensive software from IBM.

Or a bindings connection.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 22, 2007 11:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If you are using an XA transaction you should be using a binding connection or the etc client, unless your using WAS 6.0 and MQ 6.0.2.2 resource adapter....
The other thing I would do is to use session.autoacknowledge. Remember in WAS any MDB transactionality will supersede MQ transactionality. You do not want to have to deal both with acknowledgement and transactionality problems...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kaushik
PostPosted: Thu Nov 22, 2007 10:48 pm    Post subject: Reply with quote

Newbie

Joined: 21 Nov 2007
Posts: 5

ok- i am beginging to understand that there could be a few conflicts in my current setup:
1. I am using XA connection factory (i didnt really need XA, but I got queue manager errors while WAS tried to create connection factory if I used non-XA factory)
2. I use client transport (what changes shud i make to make it bindings transport to make it work for WAS 6, simply changing to bindings in admin console gives errros while creating QCF)
3. My admin has created non-transacted local queues and has specified BOQNAME and BOTHRESH as per my request
4. I use spring DefaultMessageListenerContainer (it is springs simplest implementation of MDPs- manages its own connection and thread pools)
5. I didnt want to- but in order for messages to go back to the queue and be retried again on my MessageListener, I had to set sessionTransacted = true (Default message listener maintains local transactions) and I also did setAcknowledgeMode = client;
6. I am still wondering how can the UNCOM status go away or each message be comitted to either data queue or error queue after its 3 retries are done with.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Nov 23, 2007 5:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

kaushik wrote:
2. I use client transport (what changes shud i make to make it bindings transport to make it work for WAS 6, simply changing to bindings in admin console gives errros while creating QCF)


What kind of errors?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kaushik
PostPosted: Fri Nov 23, 2007 6:18 am    Post subject: Reply with quote

Newbie

Joined: 21 Nov 2007
Posts: 5

If I specify non-XA, I get "javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager"javascript:emoticon('')
javascript:emoticon('')

My MQ manager has not specified any authentication for the queues or queue managers.

Using XA resource does not give me this error.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 23, 2007 8:43 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kaushik wrote:
If I specify non-XA, I get "javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager"javascript:emoticon('')
javascript:emoticon('')

My MQ manager has not specified any authentication for the queues or queue managers.

Using XA resource does not give me this error.


That is because in a bindings mode the only user allowed access is the user running the WAS instance connected...

In client mode you choose the user with JAAS.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Nov 23, 2007 8:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kaushik wrote:
ok- i am beginging to understand that there could be a few conflicts in my current setup:
1. I am using XA connection factory (i didnt really need XA, but I got queue manager errors while WAS tried to create connection factory if I used non-XA factory)
2. I use client transport (what changes shud i make to make it bindings transport to make it work for WAS 6, simply changing to bindings in admin console gives errros while creating QCF)
3. My admin has created non-transacted local queues and has specified BOQNAME and BOTHRESH as per my request
4. I use spring DefaultMessageListenerContainer (it is springs simplest implementation of MDPs- manages its own connection and thread pools)
5. I didnt want to- but in order for messages to go back to the queue and be retried again on my MessageListener, I had to set sessionTransacted = true (Default message listener maintains local transactions) and I also did setAcknowledgeMode = client;
6. I am still wondering how can the UNCOM status go away or each message be comitted to either data queue or error queue after its 3 retries are done with.


The UNCOM status is because of your point 5 setAcknowledgeMode=client.
You should be using the autoAcknowledgeMode....

As well you may need to SET your transaction boundaries instead of allowing default ones....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kaushik
PostPosted: Fri Nov 23, 2007 10:49 am    Post subject: Reply with quote

Newbie

Joined: 21 Nov 2007
Posts: 5

In order for messages to stay on queue, I need to keep ACK mode = client, else it gets removed from the queue.
What would have been expecetd is the MQ status gets out of UNCOM after the message is tried 3 times and is no longer available to my MessageListener.

kaushik
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Nov 24, 2007 10:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kaushik wrote:
In order for messages to stay on queue, I need to keep ACK mode = client, else it gets removed from the queue.
What would have been expecetd is the MQ status gets out of UNCOM after the message is tried 3 times and is no longer available to my MessageListener.

kaushik


You are mixing 2 modes. Syncpoint ( transacted) and non transacted.
Your assumption for client acknowledge is right for non transacted messages.
However when placing a message to the DLQ you would need to client acknowledge as well....

But you are using JMS. If the session is transacted (true,Autoacknowledge) the message gets removed from the queue (see depth change) when you receive it (on message). However if you rollback (raise the correct MDB exception or rollback for another reason) the message gets put back on the queue and the queue depth goes back up by one....

You need to verify this with the spring framework as I am not so familiar with it. What I described is the MDB behavior in WAS.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » UNCOM status on MQ
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.