Author |
Message
|
shalabh1976 |
Posted: Sun Aug 26, 2007 10:23 pm Post subject: [Solved]Propagate with MBFE node |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
Hi,
I am trying to use the MBFE File Output in my flow along with the propagate statement.
What I want is two output files with different names in the same directory:
My code looks like:
Code: |
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputRoot.XML.data = 'Hellodata';
SET OutputLocalEnvironment.Variables.MBFEProperties.FileName = 'OUT_NAME';
SET OutputLocalEnvironment.Variables.MBFEProperties.action = 'close';
PROPAGATE FINALIZE NONE DELETE NONE;
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputLocalEnvironment.Variables.MBFEProperties.FileName = 'SKG_NAME';
SET OutputLocalEnvironment.Variables.MBFEProperties.action = 'close';
PROPAGATE;
RETURN FALSE;
|
My flow is MQInput-->FileProxy-->Compute-->FileOutput
Compute mode mode is set to ALL
File Proxy :
Transaction Mode is No;
File Record threshold is 0;
File Close timeout is 0;
In-Doubt policy is Continue.
File Output :
Destination Mode is Directory;
Disposition is Generate New file;
New File name criteria is Add counter before file extension.
I have toolkit 6.0.2 with MBFE on fixpack 1
My problem is that on the output directory only 1 file is produced 'OUT_NAME' with 2 lines:
<data>Hellodata</data>
<data>Hellodata</data>
What I want is 2 files with only 1 line. Why is this happening and what is the way out? _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Last edited by shalabh1976 on Fri Sep 07, 2007 2:01 am; edited 1 time in total |
|
Back to top |
|
 |
fschofer |
Posted: Mon Aug 27, 2007 12:04 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
try 'Close' instead of 'close'
Greetings
Frank |
|
Back to top |
|
 |
shalabh1976 |
Posted: Mon Aug 27, 2007 1:26 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
No Change. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
shalabh1976 |
Posted: Thu Aug 30, 2007 8:35 pm Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
I have installed fix pack 3 for MBFE but still the problem exists. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Aug 30, 2007 10:35 pm Post subject: One thing to try |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Is NOT to propagate but to use two separate branches after a FLOW ORDER node.
Flow Order(1) --- Compute--- MBFE Out
(2)----Compute---MBFE Out
The MBFE Out Node has a few strange characteristics that do affect the results you get. There is a whole secondary process/thread that runs in the background that actually does the file writing. When the flow thread falls off the end of the MBFE Output Node, the file has not actually been written (If I am wrong here then I will stand corrected but this is what I have observed)
I actually happens a bit later (time wise)
In reality, as the MBFE Out node does not have an output terminal, doing anything after you have used it does need something like a FLOW ORDR node in front of it.
/S _________________ 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 |
|
 |
shalabh1976 |
Posted: Fri Aug 31, 2007 1:43 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
Hence in this respect the behaviour of the File Output differs from MQOutput. Having as many File Output nodes as no. of filenames is a shame and that is precisely what I wanted to avoid.
Is this a bug or a design aspect of MBFE? _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
shalabh1976 |
Posted: Wed Sep 05, 2007 12:02 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
Is this then a candidate for raising a PMR? _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Sep 05, 2007 10:13 pm Post subject: Did you try my suggestion? |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
made a few posts ago?
I can think of several other workarounds for this problem without raising a PMR.
On the other hand, I have found the MBFE team to be very responsive when I raised a few PMR's just after the product was launched.
There are indeed some issues(my personal opinion) with its design but I won't go into them here. That said, it does work and is in production now on a system that handles typically 500K messages a day. This will rise to over 1M per day by this time next year.
My advice to you would be to spend a little time looking for alternative ways to implement your functionality. You have not posted any of your efforts to resolve this in other ways. If you did do that then others can benefit in the future from your efforts.
As an aside,
Message Broker is in many ways like Photoshop. (I teach Photoshop as a sideline...)
There is ALWAYS at least two methods to do almost every task. It is just a question of finding the right one for you. (eg Destructive editing vs non destructive editing)
/Stephen D _________________ 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 |
|
 |
shalabh1976 |
Posted: Thu Sep 06, 2007 12:57 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
I already know of a solution using multiple FileOutput nodes with each writing to a different file.
My query was in using a single FileOutput node. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Sep 06, 2007 2:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
shalabh1976 wrote: |
I already know of a solution using multiple FileOutput nodes with each writing to a different file.
My query was in using a single FileOutput node. |
Would using 2 file nodes work for you?
Say you alternate: 1000 messages to MBFE1, then 1000 messages to MBFE2, then 1000 messages to MBFE1 again.... etc... just to give the node enough time to effectively close the file...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
shalabh1976 |
Posted: Thu Sep 06, 2007 2:58 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
fjb_saper,
Since the input frequency is indeterminate I cannot hold my outputs.
Each input line gives rise to two output files(with different names).
Also I already have the workaround in place by using two FileOutput nodes. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Sep 06, 2007 3:46 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi shalabh1976,
Put the compute node which does the Propagate BEFORE the FileProxy Node.
It works
Regards. |
|
Back to top |
|
 |
shalabh1976 |
Posted: Fri Sep 07, 2007 2:00 am Post subject: [Solved] |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
This works. However the MBFE documentation must be changed so that others can use this functionality and benefit.
As per the documentation(Page 12):
For this reason WebSphere Message Broker File Extender requires that when
implementing a M2F message flow (that is, a message flow rooted in an
MQInput node) you wire a FileProxy node immediately downstream of each
MQInput node. This node will act as a transparent proxy for all FileOutput
nodes contained in the flow, preserving any existing custom error management
logic.
This is not true in my scenario and needs to change i.e. FileProxy need not be placed only after a MQInput but can also be placed after a Compute node. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Sep 07, 2007 10:36 am Post subject: File a PMR |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Suggesting this as an improvement to the documentation
This way, it will have a better chance of being included in a future fixpack.
Stephen D _________________ 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 |
|
 |
elvis_gn |
Posted: Fri Sep 07, 2007 10:54 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi all,
Do you think the IBM guys will atleast give me a Sniker's for having downloaded, installed, read the docs, and done nearly 2hrs of testing and finding this solution
Regards. |
|
Back to top |
|
 |
|