|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HTTP async request |
« View previous topic :: View next topic » |
Author |
Message
|
tekt9 |
Posted: Fri Feb 27, 2015 5:26 am Post subject: HTTP async request |
|
|
Novice
Joined: 13 Aug 2012 Posts: 15
|
Hi...
scenario: I'm querying a web-service for address information. The query is created in the back-end. I wish to solve the issue using async HTTP request and response node, due to each request might use 1-3 sec and I expect small bursts(5-10 simultaneous requests) from time to time. As each query is unique, I need to have some sort of correlation between the message from the back-end and the HTTP request.
Problem: When I use the async HTTP node, all identification regarding the message is lost when i receive the HTTP response. When the HTTP request has been sent, non of the assemblies have any IDs that I can use to match request and response.
Have any of you, experience with this issue or could you refer me to an article of some sort it would be greatly appreciated
best regards
Tharani |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 27, 2015 5:30 am Post subject: Re: HTTP async request |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tekt9 wrote: |
Hi...
scenario: I'm querying a web-service for address information. The query is created in the back-end. I wish to solve the issue using async HTTP request and response node, due to each request might use 1-3 sec and I expect small bursts(5-10 simultaneous requests) from time to time. As each query is unique, I need to have some sort of correlation between the message from the back-end and the HTTP request.
Problem: When I use the async HTTP node, all identification regarding the message is lost when i receive the HTTP response. When the HTTP request has been sent, non of the assemblies have any IDs that I can use to match request and response.
Have any of you, experience with this issue or could you refer me to an article of some sort it would be greatly appreciated
best regards
Tharani |
I expect you have looked at the asynchronous samples, and your problem is not covered by them...
You'd need to pass the id into the message to the back end and have it returned to you....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mgk |
Posted: Fri Feb 27, 2015 6:20 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
You can pass information to the back end, but you can also set the UserContext field before the request, and have that data turn up with the response message (it is passed been the nodes, not via the back end).
See the HTTPAsyncRequest node docs for more info. An example would be:
Code: |
SET OutputLocalEnvironment.Destination.HTTP.UserContext = x'aabbccddeeff11223344556677889900'; |
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
tekt9 |
Posted: Tue Mar 03, 2015 12:20 am Post subject: Thanks... that did the trick |
|
|
Novice
Joined: 13 Aug 2012 Posts: 15
|
Hello
Thanks for the replies fjb_saper and mgk
The usercontext did the trick. It is not covered by the samples, and I was expecting writtendestination to hold the necessary data.
best regards Tharani |
|
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
|
|
|
|