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 Discussion » Clearing an uncommited message in a queue

Post new topic  Reply to topic
 Clearing an uncommited message in a queue « View previous topic :: View next topic » 
Author Message
MABeatty1978
PostPosted: Tue Nov 22, 2016 5:44 am    Post subject: Clearing an uncommited message in a queue Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 54

Somehow or another I have a message in a queue, currdepth=1. I have a function that checks the dept and if > 0, does a get on all messages and discards them. However, I'm getting an mqrc 2033 when I try to get this messages. Looking at the three options from the MQ documentation, all this could be is that the message was never committed, which is fine, I don't need/want the message anyway. So how do I get rid of it?
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Nov 22, 2016 6:03 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Find the application that's putting it there and not committing, and get it to commit? Alternatively, find the open handle and close it? Just a couple of considerations, pebbles in the pond so to speak.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Tue Nov 22, 2016 3:10 pm    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

I guess the most likely it is a local transaction so looking for applications that have the queue open might help. However, you can close the queue and still have uncommitted messages against it so it won't necessarily help. Of course is could be a global transaction so you could try issuing dspmqtrn to see whether there are any results.

Cheers,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
gbaddeley
PostPosted: Tue Nov 22, 2016 3:27 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

Quote:
I have a function that checks the dept and if > 0

In general, consuming apps should not use this logic (you have already found one shortcoming of this). The app should loop on getting messages, until there are none available.

Do you have any justification for checking the depth?
_________________
Glenn
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Nov 22, 2016 3:59 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

This has been discussed here at length: CURDEPTH includes consumable messages, non-consumable messages (in syncpoint, but not yet committed), expired messages. So, it is possible that you app will receive r/c 2033 (no message available) with CURDEPTH > 0.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Nov 23, 2016 3:30 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

PaulClarke wrote:
...However, you can close the queue and still have uncommitted messages against it so it won't necessarily help...

Would not a hard 'administrative' close of the open handle cause a roll-back in the application or commit?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Nov 23, 2016 3:41 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

exerk wrote:
Would not a hard 'administrative' close of the open handle cause a roll-back in the application or commit?


What command would that be?
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Nov 23, 2016 4:00 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

zpat wrote:
exerk wrote:
Would not a hard 'administrative' close of the open handle cause a roll-back in the application or commit?


What command would that be?

STOP CONN, which strictly speaking is going to do the job of closing the open handle...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Nov 23, 2016 8:21 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

How about the rsvmqtrn command?

http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q083390_.htm
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Clearing an uncommited message in a queue
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.