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 » Question about MQRO_PASS_DISCARD_AND_EXPIRY

Post new topic  Reply to topic
 Question about MQRO_PASS_DISCARD_AND_EXPIRY « View previous topic :: View next topic » 
Author Message
starki78
PostPosted: Wed Jan 05, 2011 8:09 am    Post subject: Question about MQRO_PASS_DISCARD_AND_EXPIRY Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

Hello,

I've a request response scenario between a Service-Bus and MQ-Series
and would like to pass the Expiry from the request Message to the response Message.

Let's say the request message has a expiry of 300 seconds
I want to set
MQRO_PASS_DISCARD_AND_EXPIRY in order to copy the expiry from request to response message.

However it seems not to work.

In Java I do the following to send the message to the MQ-response queue
after reading it from MQ-request and I cannot change this code.
I hope that MQRO_PASS_DISCARD_AND_EXPIRY invokes some automatism

queueSender = session.createSender(queueObj);
outMessage.setJMSCorrelationID(msg.getJMSCorrelationID());
queueSender.send(outMessage);




Please let me know if I misunderstood the purpose of
MQRO_PASS_DISCARD_AND_EXPIRY

Thanks for feedback
Back to top
View user's profile Send private message
starki78
PostPosted: Wed Jan 05, 2011 8:24 am    Post subject: Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

The doce states:

You can specify the following to pass the discard option and expiry time of the original message to the report or reply message:

* MQC.MQRO_PASS_DISCARD_AND_EXPIRY


So the question is:

What is exactly meant by reply message in the context
of a request response scenario with Correlation-ID pattern
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Jan 05, 2011 8:46 am    Post subject: Reply with quote

Poobah

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

Refer to the WMQ Application Programming Reference for MQRO_PASS_DISCARD_AND_EXPIRY and other Report Options.
_________________
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
fjb_saper
PostPosted: Wed Jan 05, 2011 2:40 pm    Post subject: Reply with quote

Grand High Poobah

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

Quote:
queueSender.send(outMessage);

you are using the wrong api call for what you want to achieve.
You need to use the overloaded version of this method, that allows you to set the time to live (as a long?) and you may want to look into the attributes of the destination.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
starki78
PostPosted: Fri Jan 07, 2011 12:57 am    Post subject: Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

I already read the docu

MQRO_PASS_DISCARD_AND_EXPIRY
If this option is set on a message, and a report or reply is generated
because of it, the message descriptor of the report inherits:
v MQRO_DISCARD_MSG if it was set.
v The remaining expiry time of the message (if this is not an expiry
report). If this is an expiry report the expiry time is set to 60 seconds.


Yes. I could change the Java-Code in order to achieve this but usually I'm not allowed to change the Client-Code.


To be honest I don't understand any benefit that property could have

Thanks
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jan 07, 2011 7:03 am    Post subject: Reply with quote

Poobah

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

Quote:
...would like to pass the Expiry from the request Message to the response Message.

Expiry value is set in the MQMD by the application that creates the message. This expiry value is decremented by the qmgr as the message sits in a queue (any queue) until the message is consumed, or it expires.

At the time the message is consumed, the MQMD (and application data) is passed to the consuming application. The original expiry value is not carried in the MQMD. The replying app will need to set the expiry value of the reply message.
_________________
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
starki78
PostPosted: Sun Jan 09, 2011 8:32 am    Post subject: Reply with quote

Acolyte

Joined: 24 Sep 2007
Posts: 53

thanks for your confirmation!
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 » Question about MQRO_PASS_DISCARD_AND_EXPIRY
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.