My Understanding :- A distributed destination is a single, logical(not physical) destination to a client which internally contains set of physical destinations (queues or topics) . It helps in scalable applications in terms of High availability(HA) and Load Balancing(LB).
So when i do distributedQueue.put(someObject)
, distributed queue will put the object on one of the phyicalQueue and also maintains some meta data to record which
object lies on which on which queue
Now when i do distributedQueue.receive()
, it will refer metadata , poll the data from right queue and serve it to client.
Is that correct ?
That would be one way of implementing a distributed queue, yes.
However, in your implementation the metadata store will very quickly become a bottleneck/hot-spot.