Skip to content

Commit 3cfaf9f

Browse files
committed
Validate consumer attributes: fail on unknown attributes
1 parent a23c2f6 commit 3cfaf9f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ydb/services/lib/actors/pq_schema_actor.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ namespace NKikimr::NGRpcProxy::V1 {
254254
passwordHash = MD5::Data(pair.second);
255255
passwordHash.to_lower();
256256
hasPassword = true;
257+
} else {
258+
TString error = TStringBuilder() << "Consumer attribute " << pair.first << " is not supported";
259+
if (error) {
260+
return TMsgPqCodes(error, Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
261+
}
257262
}
258263
}
259264
if (serviceType.empty()) {
@@ -543,7 +548,7 @@ namespace NKikimr::NGRpcProxy::V1 {
543548
return Ydb::StatusIds::BAD_REQUEST;
544549
}
545550
}
546-
} else if (pair.first == "_message_group_seqno_retention_period_ms") {
551+
} else if (pair.first == "_message_group_seqno_retention_period_ms") {
547552
partConfig->SetSourceIdLifetimeSeconds(NKikimrPQ::TPartitionConfig().GetSourceIdLifetimeSeconds());
548553
if (!pair.second.empty()) {
549554
try {

0 commit comments

Comments
 (0)