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 » WebSphere Message Broker (ACE) Support » MQMD and MQRFH2 Headers

Post new topic  Reply to topic Goto page 1, 2  Next
 MQMD and MQRFH2 Headers « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Mon Feb 07, 2011 8:10 pm    Post subject: MQMD and MQRFH2 Headers Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

I have a scenario wherein i need to get the value of a Application through my Header as this cannot be sent as part of the Data (XML). Which is he better way to get this detail? Can i use MQMD header or the MQRFH2 header for this?

As per my understanding we are not supposed to use MQMD headers for storing data, but why is it so? I just need to get only this application name as part of my header? So can i store that in my MQMD header?
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Feb 07, 2011 10:02 pm    Post subject: Reply with quote

Grand High Poobah

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

You can try and use the application Id field. However my guess is that this might get overwritten and just say broker... Otherwise use a property in the RFH2 header (usr folder)

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Herbert
PostPosted: Tue Feb 08, 2011 12:21 am    Post subject: Reply with quote

Centurion

Joined: 05 Dec 2006
Posts: 146
Location: Leersum, The Netherlands

fjb_saper wrote:
You can try and use the application Id field. However my guess is that this might get overwritten and just say broker...

Default it is indeed overwritten, however if you use the option "Set Idenity" with the "Message Context" property of the MQOuput node you can set your own values in ESQL for some MQMD fields, I think application Id is one of them.

hgj
Back to top
View user's profile Send private message Visit poster's website
kash3338
PostPosted: Tue Feb 08, 2011 1:05 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Can we use the MessageID field? Actually it has to be set by athird party application in the MQMD header and they are not able to send the detail in the MQRFH2 header.

Hence we dont have any other option other than MQMD to set this application name. Also th CorrelID has some other value already and hence cannot be used for thi purpose.

Is there any other field in MQMD (other than CorrelID and AppID) which can be used to get the application name?
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Tue Feb 08, 2011 2:07 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Don't try to use the CORRELID. This is a BLOB not a character field. Just search this forum for the tales of heartache from people trying to us MQMD fields incorrectly.

The ApplID is a good choice but... You really have to know some almost bit twiddling WMQ Application Programming to handle it correctly. Not many people (apart from us 'old timers') really understand WMQ app dev these days. Tools Like Broker make it very easy...

The MQRFH2 'usr' folder is ideal for this purpose.
That would be my choice.
also, the ApplId field is FIXED Length. All the fields in the MQMD are setup this way. It is a fixed 376 bytes (if I remember corrrectly) header. The RFH2 header 'usr' folder can have variable length character fields.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Tue Feb 08, 2011 2:52 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

smdavies99 wrote:
Don't try to use the CORRELID. This is a BLOB not a character field. Just search this forum for the tales of heartache from people trying to us MQMD fields incorrectly.

The ApplID is a good choice




Thats what its there for. As the doc says:
Quote:
ApplIdentityData is information that is defined by the application suite, and can be used to provide additional information about the message or its originator.

_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue Feb 08, 2011 10:17 pm    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

As i mentioned earlier, the AppID and the CorrelID are already holding some other information about the message and that cannot be used now.

Also, the third party application is not able to send the detail through MQRFH2 header. Hence we ought to get the message either in the UserID field or the MessageId field. We have now decided to get the information in the UserID field of MQMD. Is there any major problem in doing so?
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Tue Feb 08, 2011 10:34 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you tried it? end-to-End?
Does it get overwritten anywhere? (Not copying the MQMD in a flow)

Do some experimantation. This is relatively obscure and I'd expect that to give you an answer someone would have to try it themselves. You could do that yourself
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fatherjack
PostPosted: Wed Feb 09, 2011 1:41 am    Post subject: Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

kash3338 wrote:
As i mentioned earlier, the AppID and the CorrelID are already holding some other information about the message and that cannot be used now.


Actually you didn't. Otherwise I would not have suggested it. What you said was

Quote:
Also th CorrelID has some other value already and hence cannot be used for thi purpose.

_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Wed Feb 09, 2011 6:08 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

I certainly would not like to support this. The applId & CorrelId are already being used - for what? What if you require the userId for its intended purpose?

You really need to push back on the fact that the 3rd party app cannot use message properties or RFH2 since they appear to be willing to make changes to hack the MQMD for your use, and it would almost certainly be easier to use and support an more appropriate header.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 09, 2011 6:13 am    Post subject: Reply with quote

Grand High Poobah

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

kash3338 wrote:
We have now decided to get the information in the UserID field of MQMD. Is there any major problem in doing so?


If you decide to implement any kind of security solution in the future non-user information in the UserId field is not going to make your life any easier. If the amount of information you need to carry increases past the size of the user id field you're done.

You seem (if I have it right) to have application data in the ApplId, the CorrelId (and that's the biggest potential problem) and now the user id field. Why keep trying to squeeze data into the MQMD? Put an RFH2 on the message, move all the business data into that and eliminate both the problems of dual field use and restricted size at a stroke.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu Feb 10, 2011 9:13 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Vitor wrote:
Why keep trying to squeeze data into the MQMD? Put an RFH2 on the message, move all the business data into that and eliminate both the problems of dual field use and restricted size at a stroke.


The problem is that, from the application side they are not able to set the values in the MQRFH2 headers and thats the only reason we have put them in the MQMD headers.

Is there any other better solution than these two headers? (MQMD and MQRFH2). Database and MQ option is ruled out.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Feb 10, 2011 9:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If they can't set an MQRFH2, can they set Message Properties?
Back to top
View user's profile Send private message
wmb_wps_soa
PostPosted: Thu Feb 10, 2011 1:09 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Feb 2010
Posts: 65
Location: Detroit,Michigan,USA.

Is it good practice to carry the application name (or application details) under Message.Properties?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 10, 2011 1:15 pm    Post subject: Reply with quote

Grand High Poobah

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

wmb_wps_soa wrote:
Is it good practice to carry the application name (or application details) under Message.Properties?


The application name is usually carried in the ApplicationId field of the MQMD (as discussed above).

If there's business or other details that describe the message and/or it's payload then message properties or an RFH2 is a good place to carry is (also as discussed above).

(And before anyone says that message properties are synonymous with the MQMD & MQRFH2 then yes, I know, work with me here - v6 is not dead yet).
_________________
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 Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQMD and MQRFH2 Headers
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.