Hi,
It is not exactly clear to me from docs and forums is it possible to create new queues in a cluster dynamically?
What I mean is will getQueue("aName") generate the the queue if it is not already present in the cluster (it is not defined in the xml file before cluster startup). If it will how can it be configured, possibly from template queue defined in xml?
Also is it possible to have expiration (TTL) for such queues, so unused queues don't use up system resources?
I would like to create the queues dynamically and use them for point to point (unlike topic) pub/sub. Is there a better/recommended approach to accomplish this with hazelcast?
Best regards
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To view this discussion on the web visit https://groups.google.com/d/msg/hazelcast/-/VUilA4GNiUsJ.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.
Hi
I am evaluating Hazelcast for usage in dynamic, async, point to point, pub sub scenario, and I am wandering what the best approach is.
Publishers and subscribes communicate over dynamically created queues, of which they know names in advance, but publisher may connect before subscriber and vice versa. Publishers simply get the queue and put some data, and subscribes get the queue and get some data if available, or listen to modifications if data is not yet available. I have a few questions about this:
1. I am not clear whether queues can be dynamically created in a running cluster. Will getQueue on a non existing name create a new queue. If it will how can capacity and other parameters be configured? There is some mention in the groups of maybe being able to use predefined queue from the xml as a template, is that possible and how to select from which template queues get created?
2. As the usage scenario is dynamic, consumers may never connect to get the data. Can the old data be made to expire (TTL) if the queue consumer has not accessed it in a long time, so as to not consume resources indefinitely.
3. If the client reads available data from a queue, and then attaches a listener for any more additions does it need to wrap such an operation in transaction? Which should be done first adding a listener or draining the contents? Is it possible to guarantee no messages will be lost or duplicated?
This may not at all be the best (or even workable) approach to do it. Any suggestions? Maybe a with some maps, multimaps or lists in combination with transactions. Multimap by id for queue data, what about ordering of messages, ttl and listening to changes?
Best regards
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To view this discussion on the web visit https://groups.google.com/d/msg/hazelcast/-/4Lk5biSb-rMJ.
Instead of listening on Queue a subscriber can wait on queue.Take(). This is the blocking operation and will wait until an item is available.
The documentation should be clear if you didn't see it yet: http://hazelcast.com/docs/2.0/manual/single_html/#Queue
Hi
thanks for the answer I have just a few more questions...Instead of listening on Queue a subscriber can wait on queue.Take(). This is the blocking operation and will wait until an item is available.
I would like the wait operation to be nonblocking. Presumably I could use queue.take() from inside listener (or actually dranAll)..
The documentation should be clear if you didn't see it yet: http://hazelcast.com/docs/2.0/manual/single_html/#Queue
I am sorry, the front page links to 1.9 documentation, and this seems to be a new feature. This answers my questions.
I have one more question regarding queue creation. In certain conditions I would like getQueue to NOT create a new queue if it is not already existing. Is that possible? If it is not, perhaps I could use some queue creation listener and conditionally delete that queue or otherwise indicate it is not to be used yet?
Regards
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To view this discussion on the web visit https://groups.google.com/d/msg/hazelcast/-/kMelJWy3ncUJ.