|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Issues with a message flow using a HTTP input and a DB query |
« View previous topic :: View next topic » |
Author |
Message
|
IIBnewbie2018 |
Posted: Fri Sep 14, 2018 3:19 am Post subject: Issues with a message flow using a HTTP input and a DB query |
|
|
Newbie
Joined: 18 Jun 2018 Posts: 9
|
Hello All,
Need your help and expertise with few issues I am facing with a message flow that uses HTTP input and a long running DB query.
I'll try and explain the working and the issues as best as I can.
>The message flow receives the requests via HTTP Input
>It has 4 additional instances
>Connects to a DB (Oracle) and runs a query, selected from a list of queries based on the input
>While most queries are fast, there are a couple which could run for long (100 seconds or more) occasionally, based on data
>The time out set in the HTTP Input node is 60 after which if the query is still running, the message flow returns a time out reply to the request
>Picks up the next request after sending the timeout reply
Now the issues I face and the questions I have are as below
>Since the message flow instance uses the same DB connection unless restarted, the instance which sent a timeout and picked up the next request cannot use the same connection because that is still busy servicing the previous query. Is there a way to overcome this?
>While all the 5 instances are busy running the queries, if a new request comes, I can see them in Outstanding Requests by running the below command
mqsireportproperties <node> -e <integration server> -o HTTPConnector -r | grep -E url\|outstandingRequests
But the issue is, the outstanding requests never decrease even if the message flow instance sends a timeout for a request and picks up another
>Also is there away to explicitly close the DB connection from IIB after the timeout happens?
>Can the HTTP Input timeout be set as a property that can be changed at runtime?
Thank you. |
|
Back to top |
|
 |
timber |
Posted: Mon Sep 17, 2018 12:49 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
Since the message flow instance uses the same DB connection unless restarted, the instance which sent a timeout and picked up the next request cannot use the same connection because that is still busy servicing the previous query. Is there a way to overcome this? |
One solution would be to decouple the routing from the querying via an MQ queue. Have one message flow per query type.
Alternatively, put the long-running queries on a separate HTTP endpoint - it's probably not good practice to have services with wildly differing non-functional characteristics on the same endpoint.
You can adjust the HTTP timeout via the BAR file properties (requires a redeployment) or via the Integration API. |
|
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
|
|
|
|