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 » Doubt Regarding TCPIPClientOutput node in MB 6.1

Post new topic  Reply to topic
 Doubt Regarding TCPIPClientOutput node in MB 6.1 « View previous topic :: View next topic » 
Author Message
namakkal
PostPosted: Fri Feb 06, 2009 10:08 am    Post subject: Doubt Regarding TCPIPClientOutput node in MB 6.1 Reply with quote

Novice

Joined: 06 Feb 2009
Posts: 19

Hi,
We are trying to send two different MRM messages into TCPIPClientOutput node.
The Flow is as follows:
MQInput-->Compute-->Propagate to terminal1 TCPIPClientOutput1
-->Propagate to terminal2 TCPIPClientPutput2-->TCPIClientReceiver

The condition is that both the messages have to go through the same connection one after the other, ie once the first message is sent to TCPIPClientOutput1(the server does not respond with any data), the control should return to the compute node and then propagate to TCPIPClientOutput2 node without closing the present connection.

We tried doing this with trace nodes and found that there were 2 different Connection IDs for both these nodes.(Does it mean they are two different connections?)

Is it possible to send two different messages in two TCPIPClientOutput nodes in the same connection?

Kindly help.
Regards,
Sathish
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Feb 06, 2009 10:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why are you using two TCPClientOutput nodes, if you want to send two messages out over the same connection?

What is the format of the messages, such that you can't concatenate them together and send them once...?
Back to top
View user's profile Send private message
harish_td
PostPosted: Fri Feb 06, 2009 9:28 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Every TCPIPOutputNode is a TCP Client connection. As per TCP/IP behavior it will open a new connection on the TCP server. This is the reason why a trace shows different connection id's.

You cannot specify the broker to use the same connection unless you propagate the connection id you get in the first node call to the second node[copy the connection id to the output LocalEnvironment before passing control to the second TCPIPClientOutput node]


Hope that helps
Back to top
View user's profile Send private message Yahoo Messenger
namakkal
PostPosted: Fri Feb 06, 2009 11:05 pm    Post subject: Reply with quote

Novice

Joined: 06 Feb 2009
Posts: 19

harish_td wrote:
Every TCPIPOutputNode is a TCP Client connection. As per TCP/IP behavior it will open a new connection on the TCP server. This is the reason why a trace shows different connection id's.

You cannot specify the broker to use the same connection unless you propagate the connection id you get in the first node call to the second node[copy the connection id to the output LocalEnvironment before passing control to the second TCPIPClientOutput node]


Hope that helps


Actually I tried setting the ConnectionID before the Propagate statement to second TCPIPClientOutput node. The code i used to do that was,
SET OuputLocalEnvironment.WrittenDestination.TCPIP.Output.ConnectionDetails.ID = <Previous ConnectionID stored in LocalEnvironment>

But this did not work out. Can you please explain a bit more on how to propagate the ConnectionID of first TCPIP node to next one with a sample code. That would be very helpful.
Thanks in advance.


Last edited by namakkal on Sun Feb 08, 2009 9:57 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
namakkal
PostPosted: Fri Feb 06, 2009 11:09 pm    Post subject: Reply with quote

Novice

Joined: 06 Feb 2009
Posts: 19

mqjeff wrote:
Why are you using two TCPClientOutput nodes, if you want to send two messages out over the same connection?

What is the format of the messages, such that you can't concatenate them together and send them once...?


Actually in this scenario I cannot concatenate those two messages into one single message. These are basically two MRM messages, but the first message is just one ID which is sent to open a connection, the server does not respond for this Open request. Then once the connection is opened, I need to send the second MRM message over the same connection. Hope you got my problem.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Sat Feb 07, 2009 3:25 am    Post subject: Reply with quote

Grand High Poobah

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

Moved to correct section.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Esa
PostPosted: Sat Feb 07, 2009 5:55 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

I think TCP nodes are suitable for the most simple scenarios only. For implementing a client I would recommend using java.net.socket classes in a java compute node.
Back to top
View user's profile Send private message
namakkal
PostPosted: Mon Feb 09, 2009 12:46 am    Post subject: Reply with quote

Novice

Joined: 06 Feb 2009
Posts: 19

harish_td wrote:
Every TCPIPOutputNode is a TCP Client connection. As per TCP/IP behavior it will open a new connection on the TCP server. This is the reason why a trace shows different connection id's.

You cannot specify the broker to use the same connection unless you propagate the connection id you get in the first node call to the second node[copy the connection id to the output LocalEnvironment before passing control to the second TCPIPClientOutput node]


Hope that helps


can u tell me the procedure, how to set the connection id .we tried like
OuputLocalEnvironment.WrittenDestination.TCPIP.Output.ConnectionDetails.ID, is it correct ?
Back to top
View user's profile Send private message Send e-mail
harish_td
PostPosted: Mon Feb 09, 2009 2:33 am    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Just connect the output of the first TCPIPClientOutputNode to a compute node. That way you will be able to retain the environment details that got populated with the first TCP Session.

Else you can try this so that the environment details are not lost
Code:
 PROPAGATE TO TERMINAL 1 DELETE NONE;


Please note that the Connection ID is something the broker maintains to identify the TCP Connection. Something similar to a correlation id for TCP Connections. By using this ID you can reuse the connections

Once you have the ENVIRONMENT tree populated you just use the Node's properties set to their defaults as per Table 1 in the Infocenter for TCPIPClientOutput node.

I am sorry i do not know how to attach a screenshot for your better understanding.

No fancy code just this line does the trick for us
Code:
SET OutputLocalEnvironment.TCPIP = Environment.TCPIP;


Hope that helps.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Doubt Regarding TCPIPClientOutput node in MB 6.1
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.