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 » How to wrap the aggregation flow with a synchronous WS?

Post new topic  Reply to topic
 How to wrap the aggregation flow with a synchronous WS? « View previous topic :: View next topic » 
Author Message
Terence
PostPosted: Wed Aug 10, 2011 2:23 am    Post subject: How to wrap the aggregation flow with a synchronous WS? Reply with quote

Novice

Joined: 08 Aug 2011
Posts: 12

Hi,

My aggregation flow is implemented by MQ nodes, I want to wrap the flow with a synchronous web service? I tried to leverage the MQ service facade request-reply pattern, but failed. There are 2 MQReply nodes, one is for aggregate, one is for MQ facade pattern, I failed to connect the 2 MQReply nodes. Is it possible to combine them? In addition, is there other method to wrap it with a synchronous WS?
Is asynchronous WS better for this scenario? thanks!


Terence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2011 4:12 am    Post subject: Re: How to wrap the aggregation flow with a synchronous WS? Reply with quote

Grand High Poobah

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

Terence wrote:
I tried to leverage the MQ service facade request-reply pattern, but failed.


Failed how? Computer blew up? Your hands fell off? On the face of it, it's a reasonable enough thing to do.

Terence wrote:
There are 2 MQReply nodes, one is for aggregate, one is for MQ facade pattern,


Why? Why use 2? Design clue please?

Terence wrote:
I failed to connect the 2 MQReply nodes.


Connect how? Why?

Terence wrote:
Is it possible to combine them?


Why do you want or need to?

Terence wrote:
In addition, is there other method to wrap it with a synchronous WS?


This doesn't sound bad, but there are other ways. It's a design thing - share your thinking and requirements.

Terence wrote:
Is asynchronous WS better for this scenario?


What scenario? Either you're trying to front the MQ-based flow as a syncronous web service, or you're trying to front it as an asyncronous one, or you're trying to front it as both. Depending on which of these scenarios you're trying to implement, you front the flow differently.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 10, 2011 4:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The facade pattern works like this:
SOAPInput->...->MQOutput(backend q)
MQInput(reply q)->...->SOAPReply

So your backend flow must look like

MQInput(backend q)->...->MQOutput(reply Q)

But it's probably a lot easier to make your backend flow look like
MQInput->...+....+..->MQOutput
SOAPInput..| |...->SOAPReply

where the bit in the middle stays the same and you have something that you can look at to determine whether to call MQOutput or SOAPReply
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Aug 10, 2011 4:34 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

mqjeff wrote:


where the bit in the middle stays the same and you have something that you can look at to determine whether to call MQOutput or SOAPReply


This isn't that hard if you look at the different headers.
IF there is an MQMD then use MQ
else
...
..
..
end;
_________________
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
View user's profile Send private message
Terence
PostPosted: Wed Aug 10, 2011 6:57 am    Post subject: Reply with quote

Novice

Joined: 08 Aug 2011
Posts: 12

Sorry, I didn't describe my question clearly.

There are 2 groups of flows, aggregate flow and MQ facade flow
1. the aggregate flow

a) Fanout flow

MQInput (q1)->Aggregate control ->MQOutput (q2) -> agg request
(There are 2 aggregate branch)

b) FanIn flow

MQInput(q3)->aggregate reply -> compute node-> MQoutput(q4)

c)Aggregate Reply
MQInput(q2)-> ....(logic nodes) ->MQReply (q2-->q3)


2.The Facade flow

d) Request flow

SoapInput->...->MQOut(q5)->MQOut(store message q6)

e)Response flow
MQInput(q7)->....->SoapReply

f)MQ reply

MQInput(q5) ->...->MQReply ( q5-->q7)


The 2 groups of flows can work seperately. I want to wrap the aggregate flow with the facade flow to provide synchronous soap service, but i failed to connect them. Asynchronous soap service is also acceptable for me.

The main logic is time-consuming, and I hope it can be executed in parallel and merge the result, so i chose aggregate nodes.

Could you guys give me some guidance about the design? thanks a lot!
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2011 7:09 am    Post subject: Reply with quote

Grand High Poobah

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

Terence wrote:
I want to wrap the aggregate flow with the facade flow to provide synchronous soap service, but i failed to connect them.


Again you say failed, but don't say why. What goes wrong?

Terence wrote:
The main logic is time-consuming, and I hope it can be executed in parallel and merge the result, so i chose aggregate nodes.


Reasonable enough.

Terence wrote:
Could you guys give me some guidance about the design?


Well it seems fine; you could problably use some of the techniques described earlier to "improve" it but in principle it looks ok.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Terence
PostPosted: Wed Aug 10, 2011 7:37 am    Post subject: Reply with quote

Novice

Joined: 08 Aug 2011
Posts: 12

Vitor wrote:

Again you say failed, but don't say why. What goes wrong?


Thanks Vitor!

In my test, I set q3=q5 and q7=q4, the error is 'MQ back out to max number', there are 2 mqreply nodes in the 2 groups of flows, I doubt something is wrong with the mqreply.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2011 7:46 am    Post subject: Reply with quote

Grand High Poobah

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

Terence wrote:
In my test, I set q3=q5 and q7=q4


Set where? Certainly not on the MQReply node, which doesn't take any parameters?

Terence wrote:
the error is 'MQ back out to max number',


The error from what? WMQ? WMB? The guy who sits next to you? Is that the entire message text?

If we assume that wherever that error is being generated from it indicates that a WMQ message has hit it's backout threshold, this indicates that somewhere there is a processing error causing that message to be backed out. Perhaps finding that will help.......?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Terence
PostPosted: Wed Aug 10, 2011 8:34 am    Post subject: Reply with quote

Novice

Joined: 08 Aug 2011
Posts: 12

This Means q3 and q5 use the same backend queue.
Vitor wrote:
In my test, I set q3=q5 and q7=q4

Set where? Certainly not on the MQReply node, which doesn't take any parameters?


The error was from system event viewer, which was reported by the WMB runtime.
Vitor wrote:


The error from what? WMQ? WMB? The guy who sits next to you? Is that the entire message text?

Yes, after QueueManger/broker/EG were restarted, the soap reply is returned, It seems the problem is dispeared, I need to confirm it further. Thanks you very much for your help.
Vitor wrote:

If we assume that wherever that error is being generated from it indicates that a WMQ message has hit it's backout threshold, this indicates that somewhere there is a processing error causing that message to be backed out. Perhaps finding that will help.......?
Back to top
View user's profile Send private message
Terence
PostPosted: Wed Aug 10, 2011 5:38 pm    Post subject: Reply with quote

Novice

Joined: 08 Aug 2011
Posts: 12

Sorry, I made a mistake in this thread, q1 and q5 use a same queue, q4 and q7 use a same queue.
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 » How to wrap the aggregation flow with a synchronous WS?
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.