[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] dynamically changing a persistent subscription
I have written a client that creates an exact subscription using the Sql92 client property filter. I've also turned off the async dispatcher for this specific session by setting ?dispatcherActive=false. This session & subscription was also setup as persistent with a failsafe callback queue. I have two questions related to my implementation:
1. By disabling this session's async dispatching, I only intend to process messages for this client (joe/1) using synchronous admin gets from another client (say, john/1). Before publishing any messages, I ensure that the callback queue for joe/1 exists. If not, I launch a thread that logs in as joe/1 and creates an exact subscription based on a Sql92 filter. Since I ensure that session joe/1 never unsubscribes or explicitly disconnects, I never really have to log in as joe/1 again unless I intend to create/modify/delete its existing subscriptions. Remember, my get client (john/1) is doing all the message processing for joe/1's callback queue using admin gets. But if I want to modify joe/1's subcription or add a new one, I find that I would have to log in as joe/1 again and do unsubscribe, subscribe, etc. to get my changes done. But I'm running into a problem when I do this, because on calling connect() as joe/1 the second time, async updates are automatically triggered (like it turned on the dispatcher for this session automatically) for any messages still remaining in its callback queue. If I initially set the dispatherActive property for this session to false, how can I ensure it remains disabled even if I reconnect using the same session name?
2. If I wanted to change an existing subscription (i.e. change the Sql92 filter clauses), do I have to unsubscribe to the first one I created then recreate a new one? Or is there a way to modify a subscription on the fly?