[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] UDP publishing - Howto?

Hi Diego,

the SOCKET protocol of our java client library has no UDP implemented,
only the server side is capable to receive UDP.
Our C client library has UDP support, but this is not well tested and certainly
would need to be reviewed befor production use.


diego paloschi wrote:

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 :
java -jar lib/xmlBlaster.jar

Started XMLBlaster on host
java -jar lib/xmlBlaster.jar

Then, on I create a client which subscribes to 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) {

public String update(String cbSessionId, UpdateKey updateKey, byte[] content,
UpdateQos updateQos)
// some code

Then, on I create a client which publishes messages to (Code below):

       glob = new Global();
       con = glob.getXmlBlasterAccess();
       qos = new ConnectQos(glob);
    String receiver = "socket://";
       Address add = new Address(this.glob, "SOCKET");

       con.connect(qos, this);

MsgUnit[] msgUnits = {new MsgUnit(glob, "<key oid='myXMLBlasterService'/>",
DocumentTool.getByteArrayFromDocument(doc), "<qos/>")};

Although the message is sent to, and the client subscribed to 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