For distribution, you should use middleware. I don’t know how to apply the things in concurrent to a distributed environment. It should be not simple, otherwise there wouldn’t be so many MQs.
In your distributed environment, you still want to have only one queue. How much memory do you need? If you must have only one queue, you can wrap the LinkedBlockingQueue layer to provide an HTTP service to the outside world, and then let other machines in the distribution call this service.
LinkedBlockingQueue is not recommended. It is easy to cause problems. Capacity is a problem. If it is too big, there will be a lot of problems. If it is too small, there will be a lot of problems.
For distribution, you should use middleware. I don’t know how to apply the things in concurrent to a distributed environment. It should be not simple, otherwise there wouldn’t be so many MQs.
hazelcast
In your distributed environment, you still want to have only one queue. How much memory do you need?
If you must have only one queue, you can wrap the LinkedBlockingQueue layer to provide an HTTP service to the outside world, and then let other machines in the distribution call this service.
LinkedBlockingQueue is not recommended. It is easy to cause problems. Capacity is a problem. If it is too big, there will be a lot of problems. If it is too small, there will be a lot of problems.