Author |
Message
|
JULLRICH |
Posted: Tue Jun 09, 2009 12:15 am Post subject: TCPIP Session using WMB6.1.0.3 Nodes |
|
|
Apprentice
Joined: 11 Aug 2005 Posts: 42 Location: München
|
Hi guys,
I 've a TCPIP Server to connect to using WMB 6.1.0.3 Flows.
The server allows a single connection (a session) where to send and/or receive several messages.
So I like to send and receive messages in several WMB-Transactions using this connection. Sometimes only one msg per flow transaction - sometimes more than one message.
For me it means, it is an asynchronous TCPIP connection that must been open all the time.
We almost configured the TCPIPClientInput and TCPIPClientOutput as described in "Sending data to a TCP/IP client connection and receiving data back on the same connection (asynchronous)" in WMB InformationCenter.
And, we also used the Flow from Sample Gallery for configuration.
Timeouts in the Nodes are configured very high to prevent running into an timeout.
To test that, I defined two simple TCP Flows:
ClientFlow:
1stream
MQInput => Compute where generating two msgs and setting connectionId from Environment => TCPIPClientOutput (configured as described below) => Compute where to set EnvironmentVariable with ConnectionId
2stream
TCPIPClientInput => Trace => MQOutput
ServerFlow:
TCPIPServerInput => Trace => TCPIPServerOutput
When trying to telnet the port configured for TCPIP - it is open.
When starting the flow by putting one msg into the input queue, it went to the compute - first message will be propagated to TCPIPClient Output
it passes the TCPIPClientOutput and reaches the second compute to set Environment.ConnectionId for second message. Then second msg will be created and forwarded to TCPIPClientOutput.
Now it is written, that "A record has been received ... in TCPIP input node ''TCPIPServerInput'' ".
Nothing happens after this - no trace. No error, nothing. The message was simply written to DeadLetterQueue.
Do you have any idea?
Thanks
Jens |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jun 09, 2009 2:38 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Nothing happens after this - no trace. No error, nothing. The message was simply written to DeadLetterQueue. |
User trace should provide a fairly good idea of what has happened. Are you saying that you have tried that, and it did not give any useful info? |
|
Back to top |
|
 |
JULLRICH |
Posted: Tue Jun 09, 2009 3:21 am Post subject: |
|
|
Apprentice
Joined: 11 Aug 2005 Posts: 42 Location: München
|
Yes, I switched trace on during test. But nothing is mentioned about the Flow with TCPIP Server Nodes.
I created this Usertrace on ExecgrpLevel with TraceLevel debug.
Both Flows (Server and Client) are deployed in that ExecGrp.
In the trace is written:
A record has been sent on Hostname ''localhost'' on Port ''6004'' in TCPIP output node ''TCPIPClientOutput'' in message flow ''jfghfhj''.
But there is nothing regarding receiving that record. The Port is open - I can telnet it! |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jun 09, 2009 3:29 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
How have you configured message termination in the TCP/IP Nodes.
From my limited experience with them, this is an ultra critical thing to get right. If you don't, the Receiver Node has no idea when the incoming message terminates (all part of the TCP/IP protocol design). _________________ 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 |
|
 |
JULLRICH |
Posted: Tue Jun 09, 2009 4:28 am Post subject: |
|
|
Apprentice
Joined: 11 Aug 2005 Posts: 42 Location: München
|
message termination: ... I assume, that messages are sent completely as one as mentioned in the usertrace.
Usertrace said:
10:00:01.858406 ... A record has been sent ...
...
10:00:01.861535 ... A record has been sent ...
So there are two records on the way from "TCPIP output node ''TCPIPClientOutput''".
I'm not sure what has to be configured in TCPIP Input regarding this.
It is only logging after sending each record:
"A record has been received from Hostname ''localhost'' on Port ''6004'' in TCPIP input node ''TCPIPServerInput'' in message flow ''hasghjasfas''."
But nothing else !
.... Just now I read the UserTrace again without deleting the old trace entries. TCPServerInputNode gots both records in one and additionaly to that, it also gots the CHAR's, entered during telnet-test.
But, TCPServerInputNode forwards these records to its failure terminal.
No exception is written inside of the usertrace ... i'll force the trace node connected to this failure terminal write the ExceptionList also.
... By now I saw on the output terminal of TCPServerInputNode, an non sent message X'0d0a04040404040404040404040404'
Last edited by JULLRICH on Tue Jun 09, 2009 5:22 am; edited 1 time in total |
|
Back to top |
|
 |
mqseries0209 |
Posted: Tue Jun 09, 2009 5:21 am Post subject: |
|
|
 Voyager
Joined: 30 Mar 2006 Posts: 90
|
How did you configure the TCPIPServerInput node?.
There are different options on how you want to read the stream sent to this node.
Advanced tab ---> says how to handle the connection..default should be good for your case as u want to re-use the exisiting connection.
Records and Elements ---> this is important configuration and tells the node how the stream is interpreted interms of records/data.
Can you list the configuration on these settings and also the character data stream you are trying to parse or read.
Also make sure you conenct failure and catch terminals , at least after the timeout it should propogate to failure terminal.
Hope this helps.
-peace. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0 |
|
Back to top |
|
 |
JULLRICH |
Posted: Tue Jun 09, 2009 6:01 am Post subject: |
|
|
Apprentice
Joined: 11 Aug 2005 Posts: 42 Location: München
|
OK, THX for that usefull information.
That means, I have to close the stream. Because there is no fixed structure of the messages being sent - e.g. no msg set can be used here. And the ServerInput will get records streamwise.
When closing the stream, the connection is still open, isn't it?
Do I have to release the input stream?
Regards
Jens |
|
Back to top |
|
 |
mqseries0209 |
Posted: Tue Jun 09, 2009 6:09 am Post subject: |
|
|
 Voyager
Joined: 30 Mar 2006 Posts: 90
|
Closing the stream in broker is like doing shutDownOutput() on java socket object, it does not close the connection.
(Although in Java method close() on stream object closes the socket and hence connection)
yes, in your case the client nodes should close the stream after data has been sent and server node should be configured (records and elements tab) to read record detection as "end of stream" or you can select fixedlenght if you want to experiment with fixed lenght data as record.
-peace. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0 |
|
Back to top |
|
 |
JULLRICH |
Posted: Tue Jun 09, 2009 6:56 am Post subject: |
|
|
Apprentice
Joined: 11 Aug 2005 Posts: 42 Location: München
|
no, its not not fixed length
So I have to work using stream closing
Right now my sample test runs successfully with these settings.
I'm implementing it in the 'BigFlow' which is not connected to a WMB TCPIP Server.
It is connected to a total different application. Which acts as an TCPIP Server.
Results:
It is not working with the application.
Thanks to the helpers for now! |
|
Back to top |
|
 |
JULLRICH |
Posted: Wed Jun 10, 2009 7:54 am Post subject: |
|
|
Apprentice
Joined: 11 Aug 2005 Posts: 42 Location: München
|
Now everything seems to be fine:
Setting the advanced tab of TCPIPInputNode and TCPIPOutputNode as described in the async TCPIP sample of Brokers SampleGallery.
Additionaly to that it is very important to give details in how to parse the input stream in TCPIPInputNode in tab "Records and Elements".
I'm doing it right now using an MsgSet.
BUT how to prevent waiting?
My Usertrace shows, that the TCPIPOutput Node is always waiting for an message being received by the TCPIPInputNode when using the connectionId.
The behaviour is the following.
My flow gots a message via MQInput and processes it untill the TCPIPOutput is reached.
When no Connection was used before or the connection was closed before, it sends the message without waiting to the destination. That is the correct behaviour I always want.
The destination gots the data as soon as possible and processes it.
As far as now, everything is OK!
Later on, when a connection Id must be used for communication using the same connection, the message that arrives at the TCPIPOutput node is waiting.
It will be sent after another message arrived at the TCPIPInputNode - why that? How to stop waiting but using the same connection that used before?
Does anyone has a idea?
Regards Jens |
|
Back to top |
|
 |
|