When consuming values from a Queue in an infinite loop -- what would be more efficient:
1) Blocking on the Queue until a value is available via take()
Be careful when you use take(). If you are using take() from a service and service has db connection.
take()
If take() is returned after stale connection time out period then it will throw Stale connection exception.
Use poll for predefined waiting time and add null check for returned object.