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 IndexWebSphere Message Broker SupportIIB Design Help

Post new topicReply to topic
IIB Design Help View previous topic :: View next topic
Author Message
mario0303
PostPosted: Thu Nov 08, 2018 12:00 am Post subject: IIB Design Help Reply with quote

Newbie

Joined: 07 Nov 2018
Posts: 3

Hello Guys,
I had a requirement in which I developed an IIB service which parallely invokes two services , we did this as follows :
By using HTTP asynchronous nodes along with aggregate nodes.

But now there is an new requirement that we need to save the initial request coming to the service using Environment variable , but we discovered environment variable is lost after making parallel calls. To fix this I used a shared row variable . Its working fine .
However, I have a query that shared row variable is shared across threads , I worry one thread could end up overwriting the contents of another request that is still processing .
So , can we use some unique identifier from Http Input node itself to distinguish between requests , or is there any other option to store original request .

Thanks .
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Thu Nov 08, 2018 2:19 am Post subject: Reply with quote

Master

Joined: 17 Jul 2017
Posts: 224
Location: UK

hi...for Aggregation using MQ I've seen input info passed along as part of the RFH2 usr folder. Anyway, found the below at infocenter which you could consider for your scenario,

https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac20411_.htm

'In some cases you might want to correlate aggregation request messages with the combined response message produced by your fan-in flow, there are two ways of doing this:

Store some correlation information in one of the requests sent out as part of the aggregation.
Send the original request message directly back to the AggregateReply node as one of the aggregation requests. To do this, the CorrelId must be set to the MsgId, and the MQOutput node must have its MessageContext set to 'Pass all'.
'
Back to top
View user's profile Send private message
mario0303
PostPosted: Thu Nov 08, 2018 4:49 am Post subject: Reply with quote

Newbie

Joined: 07 Nov 2018
Posts: 3

Hi, thanks for replying , but we are not using MQ in this service .
Back to top
View user's profile Send private message
mario0303
PostPosted: Tue Nov 13, 2018 6:02 am Post subject: Reply with quote

Newbie

Joined: 07 Nov 2018
Posts: 3

Hi Guys,

Two parallel calls I am making one to HttpAsync and other to SOAP Async, and storing the original request in environment variable , for both of them and using aggreagte nodes . However if any of the calls fails environment is lost . So we decided to use shared variables , its working fine , but my concern is if multiple threads are used say in load testing then will the shared variable with one request will be overridden with the other while the 1st req is still processing .
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 13, 2018 6:20 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25310
Location: Ohio, USA

mario0303 wrote:
my concern is if multiple threads are used say in load testing then will the shared variable with one request will be overridden with the other while the 1st req is still processing .


It will.

Even if your application code isn't using MQ, you can still using the Aggregation nodes (which use MQ under the covers) and are the best solution to your problem.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Nov 14, 2018 3:07 pm Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 868

Quote:
my concern is if multiple threads are used say in load testing then will the shared variable with one request will be overridden with the other while the 1st req is still processing .
It will...unless you use BEGIN ATOMIC...END blocks around the statements that read and write the shared row variable.

https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ak04940_.htm
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportIIB Design Help
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.