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 » IBM MQ Java / JMS » jms message loss

Post new topic  Reply to topic
 jms message loss « View previous topic :: View next topic » 
Author Message
gavon stone
PostPosted: Thu May 12, 2005 12:12 pm    Post subject: jms message loss Reply with quote

Novice

Joined: 09 Mar 2005
Posts: 16

Is there a way of making sure via websphere MQ that whenever I use JMS to receive from one queue and then send to another queue that those two actions will not result in the loss of messages i.e in case there is a system failure during the message transfer. Note both queues are on the same queue manager, my jms program does:

queue1.Receive()

...........

queue2.Send()

thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 12, 2005 12:43 pm    Post subject: Reply with quote

Grand High Poobah

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

A) make sure the messages are persistent
B) make sure the session is created with transaction support

Session sess = conn.createQueueSession(true, Session.ACKNOWLEDGE)

and do a session.commit() whenever necessary.

I would go with explicit commit and rollbacks

Enjoy
Back to top
View user's profile Send private message Send e-mail
dwitherspoon
PostPosted: Tue May 24, 2005 12:23 pm    Post subject: And... Reply with quote

Acolyte

Joined: 09 Dec 2003
Posts: 59

Make sure your queue connections come from that same MQQueueMgr object...then when the commit is done through that queue mgr, he will coordinate clean movement of the message from one queue to the other.
_________________
Good...Fast...Cheap. Choose any two.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 24, 2005 12:29 pm    Post subject: Re: And... Reply with quote

Grand High Poobah

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

dwitherspoon wrote:
Make sure your queue connections come from that same MQQueueMgr object...then when the commit is done through that queue mgr, he will coordinate clean movement of the message from one queue to the other.
Not really necessary. The JMSDestination could have a different qmgr. The only imperative is that there is a default path from the qmgr you are connected to to the destination qmgr.

Otherwise your message will get put to the DLQ.

Anyway to my knowledge there is no transaction spanning mutliple sessions unless managed by an external transaction manager...(WAS).

So if you use JMS outside of WAS you are limitted in your transactional support to the Session.

Enjoy
Back to top
View user's profile Send private message Send e-mail
dwitherspoon
PostPosted: Tue May 24, 2005 12:43 pm    Post subject: Reply with quote

Acolyte

Joined: 09 Dec 2003
Posts: 59

I'm not familiar with the "default path" stuff here.

Most of my recent experience is with MQI...only using JMS for pub/sub. What's the equivalent of "default path" in MQI?
_________________
Good...Fast...Cheap. Choose any two.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 24, 2005 12:47 pm    Post subject: Reply with quote

Grand High Poobah

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

Read the intercommunication manual
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 » IBM MQ Java / JMS » jms message loss
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.