merlimat commented on a change in pull request #4079: PIP-34 Key_Shared
subscription core implementation.
URL: https://github.com/apache/pulsar/pull/4079#discussion_r277971696
##########
File path:
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/TypedMessageBuilder.java
##########
@@ -103,6 +103,15 @@
*/
TypedMessageBuilder<T> keyBytes(byte[] key);
+ /**
+ * Sets the ordering key of the message for message dispatch in {@link
SubscriptionType#Key_Shared} mode.
+ * Partition key Will be used if ordering key not specified
+ *
+ * @param orderingKey the ordering key for the message
+ * @return the message builder instance
+ */
+ TypedMessageBuilder<T> orderingKey(byte[] orderingKey);
Review comment:
> Why do you think there is no concrete need when people propose a new PIP?
One thing is the per-key delivery, one other is a CDC pipeline. The 2 don't
necessarely have to go together. This is for per-key delivery, then you bring
up CDC.
> IMO "ordering key" is not a bad name. It is a name that people already
have some general ideas about it. Also people generally understand what
partitions key and ordering key means
I think it's a very bad name in this context because it's a property on a
message that implies something that is misleading. The implementation of this
feature also has nothing to do with ordering, rather is give me messages with
same keys. Ordering is a derivative property.
> In some cases, the ordering key is a "sub-key", but it can be a completely
different key while in other cases.
In my view it's a "sub-key" because the routing is done on 2 levels, to
partition and to consumers. If you have messages with same "ordering-key" they
will be delivered out of order if they have a different partition key.
> We could have called it others if there was a better name came up in the
PIP discussion email thread.
Just to understand, where is it written that things are set in stone? If
people are busy to comments for a few days, one just submits a PR, his buddy
approves and merge and that's it? Done? No one can comment on it anymore?
Also, as a curtesy, it would be nice to actively seek comments from people
when introducing major features. It's not a race to get PR merged while others
are not looking.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services