According to the documentation (java doc) of ignite.queue():
Will get a named queue from cache and create one if it has not been created
yet and cfg is not null. If queue is present already, queue properties will
not be changed. Use collocation for CacheMode.PARTITIONED caches if you have
lots of relatively small queues as it will make fetching, querying, and
iteration a lot faster. If you have few very large queues, then you should
consider turning off collocation as they simply may not fit in a single
name – Name of queue.
cap – Capacity of queue, 0 for unbounded queue. Ignored if cfg is null.
cfg – Queue configuration if new queue should be created.
Queue with given properties.
org.apache.ignite.IgniteException – If queue could not be fetched or
But when getting an non existing queue without QueueConfiguration the queue
is null and no exception is thrown.
Documentation should say that it returns a Queue or Null, but it doesn't. It
says that it will throw an exception if the queue could not be fetched or
created, but it doesn't. It just returns null.
Yes the common pattern is not documented. So was expecting if no exception is
thrown that I'm getting a queue and can put something on it. But then if I
don't check for null I'll get a NullpointerException.