I have a doubt whether I am using distributed ehCache correctly or not in the way that data is cached.
I have a terracotta environment with distributed ehcache.
There are 5 independent clients that write data on the distributed ehcache (they dont need to share data) and 1 server that constantly read from that distributed cache and process the data.
So I am actually using the distributed ehcache as a producer/consumer queue.
The problem isthat the data is replicated within all 5 computer, I just want to replicate the ehcache on the server, would be that possible?. In a few words a client write into cache and the server read it.
I don't think what you want is possible, provided I understand your requirement. There is no way to "hide" content of the cache in some nodes and let it be available on other nodes in a single cache.
Otherwise you can use 5 separate caches for each of the 5 clients, and the server can still read from all of them.
Btw just curious why you don't want changes from other clients being visible to the other nodes. Are the clients going to have colliding key-space? Just trying to understand your use case.