Similar to how-can-you-create-a-partition-on-a-kafka-topic-using-samza I need to construct a message controlling how it's routed via use of partitionKey. key and message do require a SerDe but I'm not sure if partitionKey does as well. If so what is the configuration syntax? I suppose I can rely on Samza internally using key as the partitionKey but I'd rather keep them explicit and separate.
Asked
Active
Viewed 250 times
1 Answers
0
From the source code it doesn't seem like partition key requires a SerDe - note key and message have a corresponding xxxxSerializerName
public class OutgoingMessageEnvelope {
private final SystemStream systemStream;
private final String keySerializerName;
private final String messageSerializerName;
private final Object partitionKey;
private final Object key;
private final Object message;

Edi Bice
- 566
- 6
- 18
-
I have a related question, please would you mind taking a look? http://stackoverflow.com/questions/33502397/does-samza-create-partitions-automatically-whens-sending-messages – John Nov 03 '15 at 15:06
-
Just did and Lucas' answer is spot on. – Edi Bice Nov 17 '15 at 14:02