Author |
Message
|
Fuego Fatuo |
Posted: Thu Sep 07, 2006 12:57 am Post subject: File Transfer Application--> As it is the name of the fil |
|
|
Newbie
Joined: 06 Sep 2006 Posts: 6 Location: Madrid, Spain
|
Hello,
First, thank you very much for you help in "Transfer File over MQSeries".
Now, I am receiving messages from a MQSeries Queue. These messages belong to a file. Well, do you know how I can recover the name of the file?
Thanks. |
|
Back to top |
|
 |
deepu4u |
Posted: Thu Sep 07, 2006 1:02 am Post subject: |
|
|
Apprentice
Joined: 20 Jun 2005 Posts: 37
|
One way could be to set the GroupId at the sending side as hex encoded string of File name. At receiver side decode the string. |
|
Back to top |
|
 |
deepu4u |
Posted: Thu Sep 07, 2006 1:07 am Post subject: |
|
|
Apprentice
Joined: 20 Jun 2005 Posts: 37
|
There are many other ways:
a. add the name of file in payload - at receiver remove this name.
b. If not using context then set the name of file in Application Identity Data or Application Origin Data. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 07, 2006 2:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't use an MQ header field for custom business values, please.
Either prepend the file name to the message body, or use the MQRFH2 header (via JMS properties) to store the filename. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
deepu4u |
Posted: Thu Sep 07, 2006 3:10 am Post subject: |
|
|
Apprentice
Joined: 20 Jun 2005 Posts: 37
|
Hi jefflowrey,
Application Identity Data and Application Origin DAta are meant for that purpose only. If an application want to send some information then it can use these fields. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 07, 2006 4:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ApplIdentityData is 32 characters long.
ApplOrigData is 4 characters long.
Neither of these fields is suitable for holding a file name.
The MQMD as a whole is not intended to hold custom business identifiers.
It takes extra work to ensure that Origin and Identity Context are maintained by every program that touchs a message. I would not trust my custom business identifiers to the Origin or Identity contexts on an established MQ network.
Please don't use the MQMD for custom business identifiers. The MQ Rules And Formatting Header is perfectly fine, if you want to use a predefined and well known IBM header - and is very easy to manipulate from JMS. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|