[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] Dyanamic Subscriptions?
How's the best way to handle this? I'm trying to allow clients to subscribe
to OIDs, but I don't want them to have to know about them in advance. This
will allow new publishers to just start publishing without any client setup.
I was looking through the docs and I see that it's possible to query the
engine for the available OIDs via ?topicList. It also appears possible for
clients to register for notices when this list changes - is this correct?
If so, would it be possible for a client to query the engine for the
available OIDs and register to get changes to this list, then subscribe to
the OIDs in the return message? It looks like it. However, what happens
the first time a publisher sends a new message? The client hasn't been
informed about it and will likely miss the first message, won't they? The
first message will cause the engine to alert the client that a new message
exists, won't it? So after the first message the client should get the
updated OID list and subscribe to the new topic, but the first message will
likely be missed.
My alternative isn't quite as dynamic. I was going to have clients send a
message to a database manager who's listening for OIDs like "CONFIG" or
something. The db manager would hit a database and return a list of
messages the client is allowed to subscribe to. The client can then
subscribe to those messages. This alternative requires prior setup when you
want to institute a new publisher (or a new OID, anyway).
Is there a "best practice" for this kind of thing?
Thanks in advance!
Bret