feat: shard group messages by month
This commit is contained in:
@@ -1115,6 +1115,14 @@ func TestSaveMessageMaybeKafkaPublishesWithoutDBPersist(t *testing.T) {
|
||||
if publishedEnvelope.IdempotencyKey != "client-1" {
|
||||
t.Fatalf("unexpected idempotency key: %q", publishedEnvelope.IdempotencyKey)
|
||||
}
|
||||
var payload kafkaMessagePersistPayload
|
||||
if err := json.Unmarshal(publishedEnvelope.Payload, &payload); err != nil {
|
||||
t.Fatalf("decode kafka message payload: %v", err)
|
||||
}
|
||||
wantMonth := msg.CreatedAt.UTC().Format("200601")
|
||||
if payload.ShardMonth != wantMonth {
|
||||
t.Fatalf("group message shard month was not frozen: payload=%q want=%q", payload.ShardMonth, wantMonth)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShouldTryHotMessageFallback(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user