Skip to content

Commit c2de1a6

Browse files
committedNov 21, 2018
Deprecate queuing.strategy=lifo and msg_order_cmp
1 parent 4c186ed commit c2de1a6

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
 

‎CONFIGURATION.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ acks | P | |
128128
request.timeout.ms | P | 1 .. 900000 | 5000 | The ack timeout of the producer request in milliseconds. This value is only enforced by the broker and relies on `request.required.acks` being != 0. <br>*Type: integer*
129129
message.timeout.ms | P | 0 .. 900000 | 300000 | Local message timeout. This value is only enforced locally and limits the time a produced message waits for successful delivery. A time of 0 is infinite. This is the maximum time librdkafka may use to deliver a message (including retries). Delivery error occurs when either the retry count or the message timeout are exceeded. <br>*Type: integer*
130130
delivery.timeout.ms | P | | | Alias for `message.timeout.ms`
131-
queuing.strategy | P | fifo, lifo | fifo | Producer queuing strategy. FIFO preserves produce ordering, while LIFO prioritizes new messages. WARNING: `lifo` is experimental and subject to change or removal. <br>*Type: enum value*
131+
queuing.strategy | P | fifo, lifo | fifo | **DEPRECATED** Producer queuing strategy. FIFO preserves produce ordering, while LIFO prioritizes new messages. WARNING: `lifo` is experimental and subject to change or removal. <br>*Type: enum value*
132132
produce.offset.report | P | true, false | false | **DEPRECATED** No longer used. <br>*Type: boolean*
133133
partitioner | P | | consistent_random | Partitioner: `random` - random distribution, `consistent` - CRC32 hash of key (Empty and NULL keys are mapped to single partition), `consistent_random` - CRC32 hash of key (Empty and NULL keys are randomly partitioned), `murmur2` - Java Producer compatible Murmur2 hash of key (NULL keys are mapped to single partition), `murmur2_random` - Java Producer compatible Murmur2 hash of key (NULL keys are randomly partitioned. This is functionally equivalent to the default partitioner in the Java Producer.). <br>*Type: string*
134134
partitioner_cb | P | | | Custom partitioner callback (set with rd_kafka_topic_conf_set_partitioner_cb()) <br>*Type: pointer*
135-
msg_order_cmp | P | | | Message queue ordering comparator (set with rd_kafka_topic_conf_set_msg_order_cmp()). Also see `queuing.strategy`. <br>*Type: pointer*
135+
msg_order_cmp | P | | | **DEPRECATED** Message queue ordering comparator (set with rd_kafka_topic_conf_set_msg_order_cmp()). Also see `queuing.strategy`. WARNING: this is an experimental interface, subject to change or removal. <br>*Type: pointer*
136136
opaque | * | | | Application opaque (set with rd_kafka_topic_conf_set_opaque()) <br>*Type: pointer*
137137
compression.codec | P | none, gzip, snappy, lz4, zstd, inherit | inherit | Compression codec to use for compressing message sets. inherit = inherit global compression.codec configuration. <br>*Type: enum value*
138138
compression.type | P | | | Alias for `compression.codec`

‎src/rdkafka_conf.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
10201020
0, 900*1000, 300*1000 },
10211021
{ _RK_TOPIC|_RK_PRODUCER, "delivery.timeout.ms", _RK_C_ALIAS,
10221022
.sdef = "message.timeout.ms" },
1023-
{ _RK_TOPIC|_RK_PRODUCER, "queuing.strategy", _RK_C_S2I,
1023+
{ _RK_TOPIC|_RK_PRODUCER|_RK_DEPRECATED, "queuing.strategy", _RK_C_S2I,
10241024
_RKT(queuing_strategy),
10251025
"Producer queuing strategy. FIFO preserves produce ordering, "
10261026
"while LIFO prioritizes new messages. "
@@ -1050,11 +1050,13 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
10501050
_RKT(partitioner),
10511051
"Custom partitioner callback "
10521052
"(set with rd_kafka_topic_conf_set_partitioner_cb())" },
1053-
{ _RK_TOPIC|_RK_PRODUCER, "msg_order_cmp", _RK_C_PTR,
1053+
{ _RK_TOPIC|_RK_PRODUCER|_RK_DEPRECATED, "msg_order_cmp", _RK_C_PTR,
10541054
_RKT(msg_order_cmp),
10551055
"Message queue ordering comparator "
10561056
"(set with rd_kafka_topic_conf_set_msg_order_cmp()). "
1057-
"Also see `queuing.strategy`." },
1057+
"Also see `queuing.strategy`. "
1058+
"WARNING: this is an experimental interface, subject "
1059+
"to change or removal." },
10581060
{ _RK_TOPIC, "opaque", _RK_C_PTR,
10591061
_RKT(opaque),
10601062
"Application opaque (set with rd_kafka_topic_conf_set_opaque())" },

‎src/rdkafka_msg.c

-1
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,6 @@ int unittest_msg (void) {
15021502
int fails = 0;
15031503

15041504
fails += unittest_msgq_order("FIFO", 1, rd_kafka_msg_cmp_msgid);
1505-
fails += unittest_msgq_order("LIFO", 0, rd_kafka_msg_cmp_msgid_lifo);
15061505
fails += unittest_msg_seq_wrap();
15071506

15081507
return fails;

0 commit comments

Comments
 (0)
Please sign in to comment.