[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] finding out from MsgUnit weather it is publish or subscribe message
I think we got some missunderstanding here.
The Publish Mime plugin is only invoked when publishing. When you
subscribe the subscription is never filtered by this plugin.
Are you implementing the "three servers thing with ACK" here which we
discussed some days ago ?
If this is the case and if you want the same behaviour for subscribe too
(as we discussed for publish), then I guess the Publish Mime Plugin is
not suited for your needs and another approach should be choosen (then I
think we would need to have a look at the cluster framework).
Michael Atighetchi wrote:
You don't use MsgUnits when subscribing so if you have a msgUnit in the
client interface, then it is a publish/publishOneway/publishArray, an
update or the return of a get.
I'm actually implementing some code in a publishfilter plugin that
tries to do certains things if the message is a publish message (and
other things if it is a subscribe). This is why I'm using
I noticed that KeyData has .isQuery, but no .isPublish or .isSubscribe
? Would it be hard to add these in ?
if isQuery is true then the KeyData object is a QueryKeyData which is
used in erase, get, unSubscribe and subscribe.
If isQuery is false, then it is a MsgKeyData which is used in publish,
update and in the return value in get.
If you need a finer division than query/Message then we could add the
methods you suggested (or a String getType() method returning "publish"
...). But are you really working directly with KeyData ? in the
org.xmlBlaster.client.key package there are a set of decorators which
should be used instead.
I really need a finer granularity (either it is definitly a publish or
definitely a subscribe). Either a getType implementation or
.isSubscribe and .isPublish would be fine.
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964