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 » WebSphere Message Broker (ACE) Support » 1 -> n message conversion

Post new topic  Reply to topic
 1 -> n message conversion « View previous topic :: View next topic » 
Author Message
mapa
PostPosted: Thu Sep 27, 2001 12:43 am    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

Hi,

I would be most happy if someone could give me an advice or just comment this.

Situation:
One XML message is coming in. It contains a repeating record that holds the information where to send the message.
<RouteInfo>
<Destination>RecipientA</Destination>
</RouteInfo>
<RouteInfo>
<Destination>RecipientB</Destination>
</RouteInfo>

For each Destination I will send the same message to each Recipient. The "only" difference will be the Destination address that will be a part of the outbound converted message, which is a NEONMSG defined in NeonFormatter.
The conversion flow basic idea is MQInput -> ComputeNode with Message and Destination List -> MQOutput

I have following ideas/questions about what I can do.
1) Can I use pub/sub to subscribe to a topic and then for each subscription use a computenode to set the final destination in the message for each subscriber?
2) If not 1), I am thinking that I might need to know the upperlimit of how many different recipients the inbound message can contain, and then connect the maximum number of Outputterminals with a compute node in front of each.
3) if not 2) Then I need to something recursive that when a counter is not the same as the number of recipients, then re-compute and send to the next in turn, duplicate it before doint that, and then reprocess it again, until no more recipients.
How I should do that I don't know yet.

Help would be most appreciated

Best regards Magnus Palmér
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Thu Sep 27, 2001 6:17 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

How is the routing to each recipient achieved. Is each one a different queue.

Does the Destination Address absolutely *have* to be part of the outbound message to the recipient.

If yes to 1st question and no to 2nd, then 'normal' destination list processing will do this.

Cheers.

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
mapa
PostPosted: Fri Sep 28, 2001 1:37 am    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

To answer your questions Eddie and to add the information I found out yesterday.

The repeating RouteInfo XML structure is just a simplified view. In my case it also holds another field with a customercode that does not have to be the same each time for every recipient.

What I also now know, is that if there are three recipients, all three might need a totally different conversion of the inbound message. Since they are using different ERP systems for instance, not all but some.

One idea is to multiply the inbound message into one flow for each conversion. Convert the message and then using RouteToLabel and destinationList. Then for each destination

--> computeconversion --> set up destinations, and Labellist, using a DONE as last -> routeToLabel A -> compute the correct outbound businessdata field -> send to destinationlist A and to RouteToLabel B and so until the RouteToLabel is DONE, then I know that I am done.

Even as I write this, it sounds like a bad design...

I will always know how many Recipients there are, but my problem is that the number will increase by time and that for each new Recipient I need to update my Message flow.

If possible it would be alot neater if the flow could be intact, and for each new recipient I could just add a static subscription.
I have very poor experience of pub/sub, but of course I'll be happy to learn if it will be a much neater design.

Each recipient will receive on it's own queue.

Best regards Magnus Palmér
Back to top
View user's profile Send private message Visit poster's website
mapa
PostPosted: Tue Oct 02, 2001 12:00 am    Post subject: Reply with quote

Master

Joined: 09 Aug 2001
Posts: 257
Location: Malmö, Sweden

Hi again,

For those interested this is how I solved my problem.
(Doesn't seem as if I can post a picture of my flow.)

MQInput --> Compute node that sets the OutputDestinationList.Destination.RouterList.DestinationData[1].labelname = 'DONE', then I add a .DestinationData[Ix].labelname = InputBody..."Recipient"[Ix] for each destination address in the inbound XML message. --> RouteToLabel(Last), that in the case of the inbound message has two destinations - RecA and RecB, the it will first be routed to Label(RecB) --> divides the message, A)one compute node that does the conversion and then MQOutput, B) RouteToLabel, and next destination will be Label(RecB) that does the same thing as Label(RecA) except that it performs a different conversion in the compute node.
Then the message gets routed to the Label(DONE) where I will discard the message, or use it for logging purposes.

The trick here is that when you use the RouteToLabel(last) it routes the message to the labelname[LAST] and then removes that entry in the destinationlist.

The reason for not just sending copies of the inbound message to all the possible recipients is that I will have 15+ recipients, and each inbound message will be sent in most cases only to two or three of them.

Best regards Magnus Palmér
Back to top
View user's profile Send private message Visit poster's website
Paul D
PostPosted: Fri Jun 21, 2002 7:28 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 200
Location: Green Bay Packer Country

I just wanted to add in my 2 cents worth on this topic as I was trying to do a similar thing. I simply had a message that I needed to route to one or more labels. I was really trying to get to 1->n messages and trying to avoid using pub sub and extra queues, etc... You do this easily when you understand how to use multiple RouteToLabel nodes to "pop" the stack of 1 to many destinations you build. Build your list of labels like this (and do Route to First in each RouteToLabel node).

SET OutputDestinationList.Destination.RouterList.DestinationData[1].labelname = 'Label1';
SET OutputDestinationList.Destination.RouterList.DestinationData[2].labelname = 'Label2';
SET OutputDestinationList.Destination.RouterList.DestinationData[3].labelname = 'DONE';

After each label, attach two nodes from the out of the label, one to the nodes you need for that branch of processing and another RouteToLabel to "pop" the stack and force the message down the next one. The DONE label is used in a similar fashion to what was suggested here to end the list and not cause an error of trying route to something that doesn't exist.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » 1 -> n message conversion
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.