@@ -26,6 +26,7 @@ align="right">
26
26
* [ Initialization] ( #initialization )
27
27
* [ Creating a new queue] ( #creating-a-new-queue )
28
28
* [ Set queue settings] ( #set-queue-settings )
29
+ * [ Session identification] ( #session-identification )
29
30
* [ Putting a task in a queue] ( #putting-a-task-in-a-queue )
30
31
* [ Taking a task from the queue ("consuming")] ( #taking-a-task-from-the-queue-consuming )
31
32
* [ Acknowledging the completion of a task] ( #acknowledging-the-completion-of-a-task )
@@ -370,6 +371,20 @@ Available `options`:
370
371
` ttr ` - time to release in seconds. The time after which, if there is no active
371
372
connection in the session, it will be released with all its tasks.
372
373
374
+ ## Session identification
375
+
376
+ ``` lua
377
+ queue .identificate (session_uuid )
378
+ ```
379
+ In the queue the session has a unique UUID and one session can have many
380
+ connections. Also, the consumer can reconnect to the existing session during the
381
+ ` ttr ` time.
382
+ To get the UUID of the current session, call the ` queue.identificate() `
383
+ without parameters.
384
+ To connect to the existing session, call the ` queue.identificate(session_uuid) `
385
+ with the UUID of the session.
386
+ In case of failure, an error will be thrown.
387
+
373
388
## Putting a task in a queue
374
389
375
390
To insert a new task into a queue, use:
0 commit comments