Skip to content

Commit d0012c8

Browse files
authored
Document the queue item's marshaling behavior (#27271)
Close #26843
1 parent 3f82ca3 commit d0012c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/queue/queue.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// - An item can be a simple value, such as an integer, or a more complex structure that has multiple fields.
1010
// Usually a item serves as a task or a message. Sets of items will be sent to a queue handler to be processed.
1111
// - It's represented as a JSON-marshaled binary slice in the queue
12+
// - Since the item is marshaled by JSON, and JSON doesn't have stable key-order/type support,
13+
// so the decoded handler item may not be the same as the original "pushed" one if you use map/any types,
1214
//
1315
// 2. Batch:
1416
// - A collection of items that are grouped together for processing. Each worker receives a batch of items.

0 commit comments

Comments
 (0)