Skip to content

Commit 2a9f653

Browse files
committed
Validate consumer attributes: fail on unknown attributes
1 parent a23c2f6 commit 2a9f653

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ydb/services/lib/actors/pq_schema_actor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ namespace NKikimr::NGRpcProxy::V1 {
254254
passwordHash = MD5::Data(pair.second);
255255
passwordHash.to_lower();
256256
hasPassword = true;
257+
} else {
258+
return TMsgPqCodes(TStringBuilder() << "Consumer attribute " << pair.first << " is not supported", Ydb::PersQueue::ErrorCode::INVALID_ARGUMENT);
257259
}
258260
}
259261
if (serviceType.empty()) {
@@ -543,7 +545,7 @@ namespace NKikimr::NGRpcProxy::V1 {
543545
return Ydb::StatusIds::BAD_REQUEST;
544546
}
545547
}
546-
} else if (pair.first == "_message_group_seqno_retention_period_ms") {
548+
} else if (pair.first == "_message_group_seqno_retention_period_ms") {
547549
partConfig->SetSourceIdLifetimeSeconds(NKikimrPQ::TPartitionConfig().GetSourceIdLifetimeSeconds());
548550
if (!pair.second.empty()) {
549551
try {

0 commit comments

Comments
 (0)