hazelcastInstance.getDistributedObjects();
and see if the Queue object is there or you can use Client Security and Permissions by not giving this client a right to create a Queue. http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#permissions. Note that the latter is an Enterprise Feature. --
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/351b888e-6c76-4c78-be3e-990733a95f5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,You can either usehazelcastInstance.getDistributedObjects();and see if the Queue object is there or you can use Client Security and Permissions by not giving this client a right to create a Queue. http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#permissions. Note that the latter is an Enterprise Feature.Best,
On Wed, Jun 14, 2017 at 5:40 AM, <dla...@gmail.com> wrote:
Good day,I was wondering if the hazelcastInstance.getQueue("my-distributed-queue") will ever return null?If an application is configured to use a certain Queue but there is a config error it seems a Queue is just created using some default configuration.If there any way to avoid this and return something like null or throw and exception if a Queue for the supplied name does not exists?
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
Hi,
You can define your own config-pattern-matcher and throw exception when nothing is found for the name. Default config-pattern-matcher returns null, if there is no config found and in that case hazelcast returns a queue with default config.
Here is an example config matcher implementation (MatchingPointConfigPatternMatcher is the default impl used internally )
private static class TestConfigMatcher extends MatchingPointConfigPatternMatcher {
@Override public String matches(Iterable<String> configPatterns, String itemName) throws ConfigurationException {
String matches = super.matches(configPatterns, itemName);
if (matches == null) {
throw new ConfigurationException("No config found for " + itemName);
}
return matches;
}
}
You need to set above config matcher to hazelcast config object (either client or server config) before use:
Config config = new Config();
config.setConfigPatternMatcher(new TestConfigMatcher());
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/f950fa08-6090-4f2b-b63c-d8ae4ef5709a%40googlegroups.com.