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

Re: [xmlblaster] ConsumableQueuePlugin



Hi Joanne,
in the email I answered yesterday I forgot another possible solution to your usecase:


You could use an administrative get by querying the callback queue with the 'consumable' flag set:

1) Create a topic the normal way

2)Connect in failsafe mode: for exampel as client joe with the session 1 (joe/1). Then a callback queue is created for this session.

2) Disactivate its dispatch manager to ensure no async delivery is enabled by publishing an administrative message to the oid (this way even if somebody connects with the same session id and makes a subscription does not get anything delivered to him)

client/joe/1/?activateManager=true

see more about administrative messages at

http://www.xmlBlaster.org/xmlBlaster/doc/requirements/admin.commands.html

3) (every client who wants to consume messages repeats this)
Do an admin get by quering the callback queue of the topic as specified in the requirement:


http://www.xmlBlaster.org/xmlBlaster/doc/requirements/queryspec.plugin.queueQuery.html

The main difference between this approach and the ConsumableQueuePlugin approach is that the first is synchronous and under the control of the client which wants to consume while the second is asynchronous and under the control of the xmlBlaster server.

Note: you could omit step 2 if you are sure nobody subscribes with that session.

Cheers
Michele




Joanne wrote:
Is there any information on how to configure, activate & invoke the ConsumableQueuePlugin? The requirements link is broken.

Seeing that the msgDistributor.plugin requirement is still OPEN, the documentation on it is quite sparse. I've taken a look at the ConsumableQueuePlugin.java code, but there aren't that many meaningul comments that explain exactly what's going on.







--
Michele Laghi
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964
http://eclettic.tripod.com
http://www.xmlBlaster.org