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 » MQMD any unchanging fields?

Post new topic  Reply to topic
 MQMD any unchanging fields? « View previous topic :: View next topic » 
Author Message
yasaboy
PostPosted: Fri Jan 16, 2015 2:57 am    Post subject: MQMD any unchanging fields? Reply with quote

Voyager

Joined: 23 Jun 2014
Posts: 90

Hi,

Is there any unchanging fields in the MQMD like CorrelId or is it possible to make a field unchanged ?

My application receives a delivery report for a specific message. The correlationID set during the put time is received while message is deleted from the queue and the delivery report is generated.

I want some static string like say "TEST", to be added to the message at put time and that to be received in the delivery report. Is this possible and How ?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jan 16, 2015 3:01 am    Post subject: Reply with quote

Poobah

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

Not sure what you mean by 'unchanging.' All mqmd fields are available to the developer.
_________________
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
yasaboy
PostPosted: Fri Jan 16, 2015 3:07 am    Post subject: Reply with quote

Voyager

Joined: 23 Jun 2014
Posts: 90

Suppose I add m_Md.CorrelId = 1234 and m_Md.ReplyToQ= "Q2" in the messages when I add it to a Q1.

Now When I receive the delivery report of Q1 in Q2, it shows m_Md.CorrelId = 1234 , but the m_Md.ReplyToQ comes as NULL. How can I make it static, not changeable.

I have added a Callback to Q2 which is the delivery queue of Q1.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jan 16, 2015 3:34 am    Post subject: Reply with quote

Poobah

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

You want to make some fields in the mqmd read-only? Not supported, as far as I know.

If you want to add to the msg payload, take a look at message properties.
_________________
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
zpat
PostPosted: Fri Jan 16, 2015 3:42 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

If you want to use MQMD for "user" data, try setting the Appl Identity field.
_________________
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
RogerLacroix
PostPosted: Fri Jan 16, 2015 11:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

yasaboy wrote:
Now When I receive the delivery report of Q1 in Q2, it shows m_Md.CorrelId = 1234 , but the m_Md.ReplyToQ comes as NULL.

Working as designed.

zpat wrote:
If you want to use MQMD for "user" data, try setting the Appl Identity field.

Do as zpat suggests and use ApplIdentityData or use Message Properties as Bruce suggested.

If you use ApplIdentityData then you will need to use the MQOO_SET_IDENTITY_CONTEXT option on the MQOPEN. This means you will need to set the following MD field yourself:
    PutApplType
    PutApplName
    PutDate
    PutTime
    ApplOriginData
    UserIdentifier
    AccountingToken
    ApplIdentityData

Now if you do your thing with only 4 bytes then I would suggest using ApplOriginData which means you need MQOO_SET_ALL_CONTEXT option for the MQOPEN and you only need to set the following MD fields yourself:
    PutApplType
    PutApplName
    PutDate
    PutTime
    ApplOriginData

Are you using the entire 24 bytes of the CorrelID? You could use the last 4 or 8 bytes of the CorrelID for your "token".

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » MQMD any unchanging fields?
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.