There are several ways to do this. First one is shown in your first message - DefaultDataAffinityKey instance plays the role of primary key, while enclosed affinityId field plays the of affinity key, because it's annotated with @AffinityKeyMapped.
In case you don't have classes at all and therefore can't use annotations (for example, if you create all your objects using BinaryObjectBuilder), you can specify field name to be used as affinity key via CacheKeyConfiguration. Finally, if you use DDL to create your tables, affinity key field name can be specified as a part of CREATE TABLE command: https://apacheignite-sql.readme.io/docs/create-table Either way, affinity key is ALWAYS a part of the primary key, so there is no way to select by primary key without specifying the value for affinity key. But it's enough to provide ONLY affinity key to achieve the routing. -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
