[Koha-bugs] [Bug 32558] Allow background_jobs_worker.pl to process multiple jobs simultaneously up to a limit

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 5 15:20:38 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32558

--- Comment #15 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #14)
> From
> https://www.grzegorowski.com/rabbitmq-406-channel-closed-precondition-failed
> 
> "You have to ACK messages in same order as they arrive to your system"
> 
> If this is correct, forking is not an option here.
> 
> I have not found something similar in rabbitmq doc however.

You are correct. I've been reading a lot about ACK messages, and we are using
them wrong. ACK isn't suppose to indicate a process has completed. It's only
meant to indicate the a message has been received. In fact, sending ACK
messages appears to be optional.

This is from the O'Reilly book Mobile and Web Messaging:
---
By default, the STOMP broker will consider the message automatically
acknowledged when it is delivered to the consumer.

However, there are cases in which the consumer may prefer to explicitly
acknowledge the message. It leaves a window of opportunity to determine whether
it can handle the message or not. For example, the client needs to write the
message payload in a data store. There may be issues with opening a connection
to the data store and the client could choose to acknowledge the message only
after having successfully written its body to the data store. In case of
failure, it will instead nack the message (explicitly refuse to take ownership
of it). When the STOMP broker is informed of this negative acknowledgment, it
may then decide to deliver the message to another consumer subscribed to the
destination or try again some time later depending on its configuration.
---

I will submit a following so that we ACK the message before forking.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list