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 » Leave the message in the queue

Post new topic  Reply to topic
 Leave the message in the queue « View previous topic :: View next topic » 
Author Message
Babutian
PostPosted: Wed Oct 24, 2007 5:29 am    Post subject: Leave the message in the queue Reply with quote

Newbie

Joined: 24 Oct 2007
Posts: 6

Hi there, what is the most efficient way to ensure, that a message will stay in the queue after client application recieved it, until acknoledged? Right now messages are being removed from the queue after my java client recieved them even if i don't use the acknowledge statement.

thanks!
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 24, 2007 5:34 am    Post subject: Reply with quote

Grand High Poobah

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

If you mean until the client application acknowledges it's processed it correctly then you need to look at syncpoint options.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Babutian
PostPosted: Wed Oct 24, 2007 6:00 am    Post subject: Reply with quote

Newbie

Joined: 24 Oct 2007
Posts: 6

to be more specific: I am using a message driven bean which is being activated every time a new message enters the queue. It is intended that the message stays in the queue until the bean executes it's acknowledge statement. I've just found how to use syncpoint in the straight client connection, but i have no idea how to configure my MDB to use those syncpoint

any help would be greatly appreciated

sorry for my poor english
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 24, 2007 6:07 am    Post subject: Reply with quote

Grand High Poobah

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

Babutian wrote:
sorry for my poor english


And I'm sorry about my poor Java so we're equal!

AFAIK (and that's not very far) the message is read from the queue, consumed on acknowledge and rolled back on failure. Once read, it disappears from the queue but can reappear.

A better Java person may wish to correct me.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Babutian
PostPosted: Wed Oct 24, 2007 7:12 am    Post subject: Reply with quote

Newbie

Joined: 24 Oct 2007
Posts: 6

thanks for your help Vitor, I hope some java person will come up here soon
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 24, 2007 11:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So you want a syncpoint?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 24, 2007 8:47 pm    Post subject: Reply with quote

Grand High Poobah

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

Babutian wrote:
to be more specific: I am using a message driven bean which is being activated every time a new message enters the queue. It is intended that the message stays in the queue until the bean executes it's acknowledge statement. I've just found how to use syncpoint in the straight client connection, but i have no idea how to configure my MDB to use those syncpoint

any help would be greatly appreciated

sorry for my poor english


Check your MDB descriptor. The onMessage method of your MDB needs to be flagged for transactionality with requires New...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Babutian
PostPosted: Wed Oct 24, 2007 10:59 pm    Post subject: Reply with quote

Newbie

Joined: 24 Oct 2007
Posts: 6

jefflowrey wrote:
So you want a syncpoint?


yes

fjb_saper wrote:
Check your MDB descriptor. The onMessage method of your MDB needs to be flagged for transactionality with requires New...


could you be more specific please? What part of the MDB descriptor, what section etc.

thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 25, 2007 2:53 am    Post subject: Reply with quote

Grand High Poobah

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

Babutian wrote:
jefflowrey wrote:
So you want a syncpoint?


yes

fjb_saper wrote:
Check your MDB descriptor. The onMessage method of your MDB needs to be flagged for transactionality with requires New...


could you be more specific please? What part of the MDB descriptor, what section etc.

thanks

Read the WAS manual on MDB descriptor... It is a deployment attribute...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Babutian
PostPosted: Thu Oct 25, 2007 10:26 pm    Post subject: Reply with quote

Newbie

Joined: 24 Oct 2007
Posts: 6

I flagged my onMessage method in the MDB descriptor as you suggested nut it hasnt brought any difference...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Oct 26, 2007 3:13 am    Post subject: Reply with quote

Grand High Poobah

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

Check that MQ and WAS are at compatible revision levels.
Make sure that your MDB is throwing the right exception when it can't process the message. And remember:

If not bothresh is specified your MDB will stop
If no Backout queue is specified AND MDB retry > bothresh > 0 the message goes to the DLQ
If a BO queue is specified AND MDB retry > bothresh>0 the message goes to the BO queue.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Babutian
PostPosted: Fri Oct 26, 2007 3:31 am    Post subject: Reply with quote

Newbie

Joined: 24 Oct 2007
Posts: 6

does it mean, the message stays in the queue only if my MDB throws an appropriate exception? It was intended to use message.aknowledge() to let MQ Server know, that the message was processed correclty

thanks for your help btw
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Oct 27, 2007 5:34 am    Post subject: Reply with quote

Grand High Poobah

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

Babutian wrote:
does it mean, the message stays in the queue only if my MDB throws an appropriate exception? It was intended to use message.aknowledge() to let MQ Server know, that the message was processed correclty


If you don't throw an error, that's pretty much what you're saying!
_________________
Honesty is the best policy.
Insanity is the best defence.
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 IBM MQ Support » Leave the message in the 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.