[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] UDP publishing - Howto?
Hi,
I am taking a look at XMLBlaster to publish XML documents to a remote server
using UDP transport protocol.
Although XMLBlaster runs fine, I am failing to actually publish XML
documents using UDP. They are being sent using TCP.
I am guessing I don't have my connections configured properly?
Here is what I've done.
Started XMLBlaster on host 192.168.1.6 :
java -jar lib/xmlBlaster.jar
Started XMLBlaster on host 192.168.1.7:
java -jar lib/xmlBlaster.jar
Then, on 192.168.1.7: I create a client which subscribes to 192.168.1.7 to
get messages published to it (Code below):
glob = new Global();
try {
con = glob.getXmlBlasterAccess();
ConnectQos qos = new ConnectQos(glob);
con.connect(qos, this); // Login to xmlBlaster, register for
updates
con.subscribe("<key oid='myXMLBlasterService'/>", "<qos/>");
} catch(Exception e) {
log.error(e.getMessage());
}
public String update(String cbSessionId, UpdateKey updateKey, byte[]
content,
UpdateQos updateQos)
{
// some code
}
Then, on 192.168.1.6: I create a client which publishes messages to
192.168.1.7 (Code below):
glob = new Global();
con = glob.getXmlBlasterAccess();
qos = new ConnectQos(glob);
String receiver = "socket://192.168.1.7:7607";
Address add = new Address(this.glob, "SOCKET");
add.setRawAddress(receiver);
add.setOneway(true);
qos.setAddress(add);
con.connect(qos, this);
MsgUnit[] msgUnits = {new MsgUnit(glob, "<key oid='myXMLBlasterService'/>",
DocumentTool.getByteArrayFromDocument(doc), "<qos/>")};
con.publishOneway(msgUnits);
Although the message is sent to 192.168.1.7, and the client subscribed to
192.168.1.7 receives the message, the message is actually being sent using
TCP.
What am I not configuring correctly?
Any help would be much appreciated!
_________________________________________________________________
The MSN Entertainment Guide to Golden Globes is here. Get all the scoop.
http://tv.msn.com/tv/globes2007/?icid=nctagline2