vmihailenco / taskq

Golang asynchronous task/job queue with Redis, SQS, IronMQ, and in-memory backends

Home Page:https://taskq.uptrace.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redisq isn't acknowledging processed messages.

subomi opened this issue · comments

Please correct me If I'm wrong. I have been running a script to generate events and consumer likewise with the code below:

// Define Our Queues
 var (
	ScheduledQueue = QueueFactory.RegisterQueue(&taskq.QueueOptions{
		Name:  "ScheduledQueue",
		Redis: redisClient,
	})
 )

// Define Task
 var (
	WorkProcessor = taskq.RegisterTask(&taskq.TaskOptions{
		Name:       "WorkProcessor",
		RetryLimit: 10,
		Handler: func(job *Job) error {
			log.Printf("Processing Job - %s", job.ID)
			
			return nil
		},
	})
 )

// Schedule task.
 err := ScheduledQueue.Add(msg)
 if err != nil {
	log.Printf("Error occurred scheduling job - %s", job.ID)
 }

When I check the logs after the ReservationTimeout is past, I start to multiple lines of see:

taskq: 2021/10/12 13:27:24 queue.go:296: redisq: pending failed: redisq: can't find peding message id="1634040420749-0" in stream="taskq:{ScheduledQueue}:stream"

Then I go into redis-cli and perform xack taskq:{ScheduledQueue}:stream taskq 1634040419532-1 and the entry is acknowledged and it starts to complain about the next item in the Pending List.

Am I doing something wrong or is this a bug?

Thanks