Author |
Message
|
kblv |
Posted: Tue Dec 06, 2011 4:04 am Post subject: using ${messageid} in monitor |
|
|
Novice
Joined: 11 Oct 2011 Posts: 23
|
Hi,
I am trying to create a queue to file monitor.
I want the file name to be equal to the message id,
I used ${messageid} but I got the "message identifier bytes" value instead of the "message identifier" value.
any help?
thanks in advance! |
|
Back to top |
|
 |
Choubey |
Posted: Fri Jan 06, 2012 2:40 am Post subject: |
|
|
Newbie
Joined: 06 Jan 2012 Posts: 2
|
try using the variable in your monitor xml file under metadata and then use.
<metaData key="FILNM">${MESSAGEID}</metaData>
This may help you!!
Choubey |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 06, 2012 6:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Just as a question:
How will you handle the case where the file transfer needs more than 1 message? Or does the messageId here reference the messageId of the control message asking for the FT?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Choubey |
Posted: Mon Jan 09, 2012 6:32 am Post subject: |
|
|
Newbie
Joined: 06 Jan 2012 Posts: 2
|
I guess you must be using the -tr completeGroups option while fteCreateMonitor, the files which comes fragmented in queue will be reporcessed as the same FILNM for all the logical sequence of the messages. |
|
Back to top |
|
 |
kblv |
Posted: Tue Jan 31, 2012 10:39 am Post subject: |
|
|
Novice
Joined: 11 Oct 2011 Posts: 23
|
I tried to use Choubey's solution,
this how the monitor XML is look like:
Code: |
<request version="4.00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>hostName</hostName>
<userID>userID</userID>
</originator>
<sourceAgent QMgr="QM1" agent="Agent1"/>
<destinationAgent QMgr="QM2" agent="Agent2"/>
<transferSet priority="0">
<metaDataSet>
<metaData key="FILNM">${MESSAGEID}</metaData>
</metaDataSet>
<item checksumMethod="MD5" mode="binary">
<source>
<queue>$filepath</queue>
</source>
<destination exist="error" type="directory">
<file>C:\test\${FILNM}.txt</file>
</destination>
</item>
</transferSet>
</managedTransfer>
</request>
|
I used the fteCreateMonitor command with trigger set to queueNotEmpty,
but it doesn't work, for some reason no transfer is starting.
When replacing this line
Quote: |
<file>C:\test\${FILNM}.txt</file> |
with this line
Quote: |
<file>C:\test\${MESSAGEID}.txt</file> |
its back to work but still getting back to the same problem from the begining.
So how anyway I can control the file name when using queue-to-file monitor?
thanks in advance! |
|
Back to top |
|
 |
yeger |
Posted: Wed Feb 01, 2012 3:56 am Post subject: |
|
|
 Newbie
Joined: 09 Mar 2005 Posts: 8
|
just to be clear
under the <queue>$filepath</queue>
we actually use <queue>QueueName</queue>
and despite of that we are unable to make this thing works.
10x
Yeger |
|
Back to top |
|
 |
|