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

RE: [xmlblaster] Subscriber getting first message only

Here's the publish code:

            PublishQos pqos = new PublishQos(global);
            PublishKey key = new PublishKey(global, oid);
            String data = getFile(args[0]);
            MsgUnit msg = new MsgUnit(key, data, pqos);

            String stamp = Long.toString(System.currentTimeMillis());
            StringBuffer tags = new StringBuffer();

            I_XmlBlasterAccess conn = global.getXmlBlasterAccess();
            ConnectQos cqos = new ConnectQos(global);
            cqos.setSessionName(new SessionName(global, "DocSender"));
            ConnectReturnQos cretqos = conn.connect(cqos, null);

            PublishReturnQos pretqos = conn.publish(msg);

            conn.disconnect(new DisconnectQos(global));

Running the publisher program twice gives two MsgUnitWrapper's in the
TopicHandler section for the OID.  Each has a different timestamp in the
client tags area.  However, only the first timestamp message is in the
XmlKeyDom section.

-----Original Message-----
From: Michele Laghi [mailto:laghi at swissinfo.org] 
Sent: Friday, April 04, 2003 3:40 PM
To: xmlblaster at server.xmlblaster.org
Subject: Re: [xmlblaster] Subscriber getting first message only

Hallo David,
in a normal case you should receive all three messages.
If you subscribe after having published the messages, then you would 
only get the last published message. On the other hand you say you 
receive only the first: if you set explicitly forceUpdate to 'false' in 
the publishQos and the content of the messages is the same, then you 
will only get the first one.

If none of the mentionned is your case you should send us the code.


David Hooker wrote:
> I know this is probably answered somewhere, but I've looked for a
> of hours and can't find where.
> I have a publisher which publishes a message with a fixed oid.  I have
> an EXACT subscriber which subscribes to this oid.
> The first message published is sent to the subscriber.  The second and
> subsequent messages published are _not_ being sent to the subscriber.
> The TopicHandler section for the oid has both messages stored in it,
> only the first one is referenced in the XmlKeyDom section - the second
> message isn't listed there.  Why is this?  How can I make sure all
> messages after the first one are published?
> (Forgive my questions... I'm new to xmlBlaster.)