You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "smjn (via GitHub)" <gi...@apache.org> on 2026/03/05 10:26:32 UTC
[PR] KAFKA-20256: Add ShareGroupDLQ interface and some infra classes. [kafka]
smjn opened a new pull request, #21640:
URL: https://github.com/apache/kafka/pull/21640
* Add `DLQManager` interface (evolving).
* Add a NoOp impl for above.
* Add java record classes to server as arguments for `DLQManager.enqueue`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20256: Add ShareGroupDLQ interface and some infra classes. [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #21640:
URL: https://github.com/apache/kafka/pull/21640#discussion_r2902493540
##########
server-common/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQ.java:
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.share.dlq;
+
+import org.apache.kafka.common.annotation.InterfaceStability;
+
+import java.util.concurrent.CompletableFuture;
+
+/**
+ * The main interface to identify implementations of dead letter queues for share groups.
+ */
+@InterfaceStability.Evolving
Review Comment:
nit: This annotation is used for public Kafka interfaces to indicate they are unstable. I don't think you need to annotate internal interfaces you are working on because users are not depending upon them.
##########
server-common/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQRecordParameter.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.share.dlq;
+
+import org.apache.kafka.common.TopicIdPartition;
+
+import java.util.Optional;
+
+/**
+ * Record representing information needed from callers of {@link ShareGroupDLQ#enqueue}. Inclusion
+ * of first and last offset allows passing batch information as well.
+ *
+ * @param groupId The share group id of the message being recorded.
+ * @param topicIdPartition The topic and partition information of the message.
+ * @param firstOffset The first offset of the records in the kafka topic partition.
+ * @param lastOffset The last offset of the records in the kafka topic partition.
+ * @param deliveryCount If known, the number of times the message was delivered to the share consumer.
+ * @param cause If known, throwable representing the reason for queueing the message.
Review Comment:
I don't think you'll know the cause and also there's no way to pass the cause to the DLQ message. I would remove the cause.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20256: Add ShareGroupDLQ interface and some infra classes. [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield merged PR #21640:
URL: https://github.com/apache/kafka/pull/21640
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20256: Add ShareGroupDLQ interface and some infra classes. [kafka]
Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #21640:
URL: https://github.com/apache/kafka/pull/21640#discussion_r2923667559
##########
server-common/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQRecordParameter.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kafka.server.share.dlq;
+
+import org.apache.kafka.common.TopicIdPartition;
+
+import java.util.Optional;
+
+/**
+ * Record representing information needed from callers of {@link ShareGroupDLQ#enqueue}. Inclusion
+ * of first and last offset allows passing batch information as well.
+ *
+ * @param groupId The share group id of the message being recorded.
+ * @param topicIdPartition The topic and partition information of the message.
+ * @param firstOffset The first offset of the records in the kafka topic partition.
+ * @param lastOffset The last offset of the records in the kafka topic partition.
+ * @param deliveryCount If known, the number of times the message was delivered to the share consumer.
+ * @param cause If known, throwable representing the reason for queueing the message.
Review Comment:
@AndrewJSchofield This is for logging purpose - the cause could be "delivery_count_exceeded" or "client_reject" as ascertained by the SharePartition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org