merthmagic
merthmagic

Reputation: 175

Issues with Keyword Arguments in redis-py when Acknowledging Stream Messages

I am currently using redis-py to read streams, but when calling xack, I found that everything works fine if I use positional arguments. However, when I use keyword arguments and specify the names for each parameter, I always encounter errors. What could be the problem?

here is my code

ids = [stream_id]

print(self.stream_name) 
print(self.consumer_group)
print(*ids)

# print results are:
# jobs
# default-group
# b'1708682497653-0'

r.xack(name=self.stream_name,groupname=self.consumer_group,*ids)

the error message :

r.xack(name=self.stream_name,groupname=self.consumer_group,*ids) TypeError: StreamCommands.xack() got multiple values for argument 'name'

Upvotes: 0

Views: 51

Answers (0)

Related Questions