Hi!
The |@AffinityKeyMapped annotation can be used on a field or a method,
so you can have a method returning anything you want (based on size),
would that not work ?|
|Mikael
|
Den 2018-04-11 kl. 07:59, skrev Prasad Bhalerao:
Hi,
I have following case.
I have around 10000 subscriptions. Each subscription has data varying
from 1 to 10 million.
Currently the affinity key is set on subscriptionId.
e.g:
Subscription1: 2 million rows
Subscription2: 10 million rows
Subscription3: 50 million rows
Subscription5: 30 million rows
Subscription6: 20000 rows
Now I want make sure that all big subscription should be evenly
distributed across all nodes.
I meant Subscription2,Subscription3,Subscription4,Subscription5 should
not land on same node based on their affinity id.
Is there any way with which I can distribute all big subscriptions
across all node evenly or in round robin fashion?
Thanks,
Prasad