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 API Support » How to set Message Identifier of the WebSphere MQ 6.0?

Post new topic  Reply to topic
 How to set Message Identifier of the WebSphere MQ 6.0? « View previous topic :: View next topic » 
Author Message
raghvendra_chourasia
PostPosted: Thu Jun 14, 2007 2:55 am    Post subject: How to set Message Identifier of the WebSphere MQ 6.0? Reply with quote

Newbie

Joined: 14 Jun 2007
Posts: 5
Location: Nagpur

Hello Everyone,

I am using the Web Sphere MQ Explorer 6.0.
I have created a queue manager and Some queues in that manager.
But now I want to set the message Identifier for the messages in that queue.So that I can send the messages of the queue to the other side with a specific identifier
I don't know how to set the Identifier.

Please help me.
Thank you
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Jun 14, 2007 2:57 am    Post subject: Reply with quote

Grand High Poobah

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

Don't do this. It's a really, really bad idea. At best you're making a rod for your own back, at worst you're going to bring the queue manager down.

For more information search the forum, where this potentially suicidal idea surfaces every so often and discussed. To the best of my recollection, no-one has yet come up with a compeling reason for doing this.

If you have business information that need to accompany the message (having exhausted all the options for putting in the message where it belongs) put in in the Application fields of the MQMD.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
raghvendra_chourasia
PostPosted: Thu Jun 14, 2007 8:39 pm    Post subject: Reply with quote

Newbie

Joined: 14 Jun 2007
Posts: 5
Location: Nagpur

Hi Vitor,

Actually, I have some files with me, And I have to send the data of that files through MQSeries.
But What I want is that, I should also get the name of the file, Whose data I am receiving from the Queue.
If i set the message identifier as the file name, Then I can Easily get the file name along with the file's data.
I can not modify the file.

Can you suggest me some other way to do this.
Back to top
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Thu Jun 14, 2007 10:48 pm    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

How big these files are ?
How long are names of this files ?

My 2 tips

1.
You can use ApplIdentityData mqmd field to store this additional informations.

2.
If they are not very big you can convert content of files into base64 and place it, name and date in one XML.
_________________
Marcin


Last edited by marcin.kasinski on Fri Jun 15, 2007 4:10 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Fri Jun 15, 2007 12:12 am    Post subject: Reply with quote

Grand High Poobah

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

raghvendra_chourasia wrote:
Can you suggest me some other way to do this.


Use PM4Data or one of the other file transfer products.

Use reference messages.

Use ApplIdentData as marcin.kasinski and I have suggested.

Don't set message id.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jun 15, 2007 3:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can only use ApplIdentData if the file name is short enough to fit into ApplIdentData.

This is the typical problem found when trying to misuse the MQMD (a transport header) for business data - that there just isn't room.

I quite like Martin's idea of base64 encoding the file and putting in a simple XML.

Or put the filename into an MQRFH2 header, in the usr folder.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Fri Jun 15, 2007 4:13 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

jefflowrey wrote:
You can only use ApplIdentData if the file name is short enough to fit into ApplIdentData.

This is the typical problem found when trying to misuse the MQMD (a transport header) for business data - that there just isn't room.


Exactly.

That's why I asked about length of name of these files.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
raghvendra_chourasia
PostPosted: Sun Jun 17, 2007 9:01 pm    Post subject: Reply with quote

Newbie

Joined: 14 Jun 2007
Posts: 5
Location: Nagpur

Hello,

The filename may vary from 15 characters to 50 characters.
Back to top
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Sun Jun 17, 2007 11:16 pm    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

raghvendra_chourasia wrote:
Hello,

The filename may vary from 15 characters to 50 characters.


ApplIdentityData field datatype is MQCHAR32.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
raghvendra_chourasia
PostPosted: Mon Jun 18, 2007 4:49 am    Post subject: Reply with quote

Newbie

Joined: 14 Jun 2007
Posts: 5
Location: Nagpur

What is the maximum number of characters ,which We can put in the ApplIdentData field of the MQSeries 6.0?
Back to top
View user's profile Send private message Send e-mail
marcin.kasinski
PostPosted: Mon Jun 18, 2007 4:50 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

raghvendra_chourasia wrote:
What is the maximum number of characters ,which We can put in the ApplIdentData field of the MQSeries 6.0?


32
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Tue Jun 19, 2007 8:50 am    Post subject: Reply with quote

Jedi Knight

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

jefflowrey wrote:
This is the typical problem found when trying to misuse the MQMD (a transport header) for business data - that there just isn't room.

Just to knit pick a little, I don't like the word 'misuse' above because it is not true. The MQMD ApplIdentityData field is there to be used by applications, if they want to.

From the manual:
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. The queue manager treats this information as character data, but does not define the format of it. When the queue manager generates this information, it is entirely blank.


MQMD fields like CorrelId, Format, Expiry, Report, ApplIdentityData, ApplOriginData and AccountingToken were put in specifically for applications to use. If an application chooses not to use them then the queue manager leaves them blank or null (except for AccountingToken on certain platforms, it is filled in).


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
jefflowrey
PostPosted: Tue Jun 19, 2007 9:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Well, if we're going to pick nits...

A file name is not "information about the message or it's originator", it's "information about a different container of the contents of the message".

The real problem with using these fields for business level data is that it is very hard to guarantee that every application that touches the message will preserve these fields intact. Particularly if one is talking to things like the CICS bridge, or third party JMS applications.

The same is, generally, true of an MQRFH2 - but there's usually a bit more care taken with those than an MQMD - so it's less risky. It's been my experience that most MQ applications generate a new MQMD every time they send a message, and only concern themselves with things like CorrelId and MsgId when it comes to copying things from the old MQMD.

Otherwise, yeah. I'll take your point that "misuse" is the wrong term given the design intent.
_________________
I am *not* the model of the modern major general.
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 » IBM MQ API Support » How to set Message Identifier of the WebSphere MQ 6.0?
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.