Author |
Message
|
PEPERO |
Posted: Sun Jun 12, 2011 5:13 am Post subject: WMB TCP/IP node |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Hi;
I'm using a TCP/IP node under WMB which is going to receive a message from the client application written in java.I dont want to use JMS as the message protocol. As i have read in the manuals the node supports only the RAW socket types . On the other hand the Raw sockets are not supported in java. is there an alternate solution for this case? |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jun 12, 2011 10:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Java can certainly read and write from a plain TCPIP socket, that can therefore be read by a TCPIP node in Broker.
But you probably really just want to use HTTP instead, if for mysterious reasons you don't want to have the java application use JMS and then you use an MQInput node.
Because what you are proposing to do, using TCPIP directly, is complicated and not for beginners. HTTP is going to be much easier on both ends. |
|
Back to top |
|
 |
PEPERO |
Posted: Sun Jun 12, 2011 6:50 pm Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Thanks for your guidlines.
But i still want to use the TCP/IP. I don't know why the BROKER supports only the raw socket types , i mean for the security reasons? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 13, 2011 4:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
PEPERO wrote: |
I don't know why the BROKER supports only the raw socket types |
IMHO unless your intention is actually to use ICMP best advice is to get the http protocol to do some of the lifting for you. Or use JMS & get that to do all the lifting for you.
Perhaps if you explained a little about which socket type you're trying to implement and why? There may be another method. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Jun 13, 2011 4:44 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Can you please explain to us why you must use TCP/IP nodes when using a protocol like HTTP will make life so much easier in the long run.
TCP/IP is a (IMHO) contact admin thing to program. For starters when receiving a stream of data you have no idea how long it is. Sometime you get a 4byte Lenght then a stream of data. You have to firstly read the length and then do another read using the length param. In other cases you have to read everything until you get a defined ETX character. Ugh. Just pick any tome on TCP/IP programming and you will see why. Having been programming & using networked systems since 1974 I hope you will see my POV.
Using a message based protocol that sits on top of TCP/IP is IMHO always the preferred solution. HTTP is one example of this. All the hard work is done for you. _________________ 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 |
|
 |
|