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 » Storing Message

Post new topic  Reply to topic
 Storing Message « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Tue Dec 11, 2007 2:36 am    Post subject: Storing Message Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All,

I have a requirement wherein i have to store the message until the received message is transformed properly.Then i have to forward the stored message and the transformed copy the message to two different queues. How can i do this?

Regards
brgmo.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Dec 11, 2007 2:54 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi brgmo,

Your question is not very clear, but from what I have understood, I think you can achieve the requirement by using a simple PROPAGATE...(unless the transformation is being done outside the flow )

Regards.
Back to top
View user's profile Send private message Send e-mail
brgmo
PostPosted: Tue Dec 11, 2007 3:10 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Let me reword my question.My messag flow receives a message from the queue.After receiving the message,the requirements are that i need to store the message.So,my first question is where to store the message in the broker environment(not database) so that it remains intact even in the case of exception.The next stepis to transform the message.If the transformaton is successful,i would like to forward the stored message and the transformed message to two different queues.How i can achieve this.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 11, 2007 3:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
So,my first question is where to store the message in the broker environment(not database) so that it remains intact even in the case of exception.


The broker environment cannot be guaranteed in the event of exception or failure. Use a database.

brgmo wrote:
The next stepis to transform the message.If the transformaton is successful,i would like to forward the stored message and the transformed message to two different queues.How i can achieve this.


a) Why store the message at all? If the transformation is unsuccessful, roll back to obtain the original message.

b) Use two different legs for the send? Use PROPOGATE? Either would work.

c) If you store the message, don't forget to delete it once the transformation is successful. Unless you want an audit trail.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Tue Dec 11, 2007 3:47 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Can i do it this way:

1.Store the received message in Environment tree.
2.Do the transformation of the recvd msg.
3.If transformation successful, then
Propogate stored message to Q1
Propogate xmed message to Q2


Even if the exception occurs,the environment tree will remain intact.

Regards
brgmo.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Dec 11, 2007 3:53 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi brgmo,

I guess I did get your requirement right.

1. Do a propagate from a compute node..
2. Put a try catch block and inside it, do the transformation...if successful send it to your output queue, if failed, catch and do whatever...
3. After this is done, control will return to the compute, from there use the current message(which is your stored msg), and send to your 2nd desired queue.

Regards.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Dec 11, 2007 3:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
Even if the exception occurs,the environment tree will remain intact.


Sure?

Does it scale?

I stick with my suggestion, as expanded quite beautifully by elvis_gn, of using unit of work.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Tue Dec 11, 2007 3:59 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Thanks a lot guys. Just one more question.If i want to propagate the message one by one to different queues,how can i do that. I mean i will generate messages within the same compute node but i need to forward that to different queues using propagate statement. I mean can i do something like below pseudocode:

Set msg 1 = Do Smething;
Propogate to Q1;
Set msg 2 = Do Smething;
Propogate to Q2;
....
....

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 11, 2007 4:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Given that msg1 and msg2 in your pseudocode are both the OutputRoot.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Tue Dec 11, 2007 4:19 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

How to write the code for that i mean propogating messages to two different queues in the same comput node.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 11, 2007 4:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
How to write the code for that i mean propogating messages to two different queues in the same comput node.


Look up the PROPOGATE verb in the ESQL reference. You build the message you want in the normal way and PROPOGATE it out.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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