|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Multipart message |
« View previous topic :: View next topic » |
Author |
Message
|
wmbbie |
Posted: Mon Oct 06, 2008 5:58 am Post subject: Multipart message |
|
|
Newbie
Joined: 06 Oct 2008 Posts: 2
|
Hi,
Environment is Message Broker 6.1.0.1
i have a message coming in and the message type will be determind by 2 bytes from 8th byte, the value can be from 00 to 99 and if its 00 i have to parse using one message type else by another message type, is there any other way instead of creating message alias for all alises for 01-99 message types.. |
|
Back to top |
|
 |
wmbbie |
Posted: Wed Oct 08, 2008 6:20 am Post subject: |
|
|
Newbie
Joined: 06 Oct 2008 Posts: 2
|
Here is my Scenario:
Input File will have multiple fixed length records (n number) of different record types each record in file is trerminated by \r\n.
At high level, it can be summarized as, there will be mulitple groups in a file, each group having 1 row of Record_0 followed by
multiple rows of Recor_(1,2, ....99). All the Records are of same fixed length. The Record Type Identifier will be 2 bytes value from 7th position.
RecordType_0 is of type msg1 and all other RecordTypes (1...99) are of same type msg2.
i.e., File
Record_0
Record_1
Record_4
Record_6
...................
...................
Record_0
Record_2
Record_5
Record_8
...................
...................
Record_0
Record_1
Record_7
...................
...................
Present Solution:
Multip-Part Message:
I have created a multipart msgset consisting 2 msgs (msg1 & msg2) resolved using Message Alias (0...99).
This was done by creating 99 messages refering to msg2 complext type, to achieve message alias for each.
I am trying to find a way to eliminate creation of total of 100 msgs (where as it supposed to be only 2 msgs - msg1 & msg2).
Is there any other way to solve this, to map to msg1 or msg2 based on 2 bytes value from 7th position.
I am trying to see, if Regular expression can be supported to identify 2 bytes field:
00 or [1-9]{2}
From the above regular expression, first case should map to msg1 and second case should map to msg2.
Thanks in advance. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Oct 08, 2008 8:05 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You can exploit the 'unresolved choice' feature of the MRM CWF parser. In CWF, choices are parsed as a BLOB until resolved via ESQL.
- Create a single CWF message definition with a choice of msg1 and msg2 at the appropriate position
- In a Compute node, inspect the message type field, and resolve the choice by simply attempting to read the appropriate branch of the choice. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|