[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Notifying Clients
chris lau wrote:
If it is only one message which B is waiting on you could throw a
I am trying to setup a situation where client A publishes a PTP message to client B. Client B
subscribes for updates using the callback method. The problem I'm running into is that I want
Client B to get a notification that a message has arrived but I *do not want* to remove the
message from the queue. Client B will then use the get() method at a later time to retrieve the
during update(), like this B is notified and the message remains in the
servers callback queue.
After retrieving the message with get() you can set the
Another possibility is that B logs in as B/1 and B/2.
If the PtP is send to B, both session will receive it.
Now B/1 gets it consuming over update() and is 'notified'.
B/2 didn't specify a callback server and did set dispatcherActive=false
Now B/2 uses sync get()s only to retrieve.
Still another solution is to use a receive() call setting consuming=false.
Now B blocks and returns when the message has arrived ("notifiy").
Later, you can call receive() with consumable=true to access and destroy it.
Another possibility is to have another login session to subscribe on
the PtP topic
and is like this notified. B has set dispatcherActive=false already
and only uses get() or receive() synchronously whenever needed.
Probably there are some more ways to solve it,
What is happening now is that as soon a Client A publishes a message and the update() method of
Client B is triggered, the message is removed from the queue.
I've tried to set the subscribeQos.setWantContent to false, but that doesn't keep the message in
So, basically, here is the sequence of events.
1. Client B connects and subscribes for updates.
2. Client A connects and publishes a message.
3. Client B receives a notification that a message has arrived. Message remains in queue.
4. A period of time elapses...
5. Client B retrieves message contents.
6. Client B removes message from queue (if not done automatically)
Is xmlBlaster able to do this?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around