Bug 37885 - Add ability to disable message queue processing
Summary: Add ability to disable message queue processing
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
Depends on: 37869
Blocks:
  Show dependency treegraph
 
Reported: 2024-09-10 19:01 UTC by Kyle M Hall (khall)
Modified: 2024-09-19 18:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 37885: Add ability to disable message queue processing (6.52 KB, patch)
2024-09-19 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 37885: Add ability to disable message queue processing (6.54 KB, patch)
2024-09-19 13:41 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 37885: Add ability to disable message queue processing (7.69 KB, patch)
2024-09-19 18:32 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2024-09-10 19:01:45 UTC
There exist services that libraries utilize as an alternative to processing the message queue. These services may utilize the queued messages and send them from outside of Koha. Sometimes these services utilize the API or reports while other times they utilize a plugin. It would be beneficial to be able to disable running the message queue processor altogether, or to only execute the plugin hook related to message queue processing ( before_send_messages ) to limit the processing of messages to those handled by plugins. 

I think a new system preference along the lines of "Process/Don't process/Process only via plugins" would be good, but haven't quite come up with a sentence that makes sense.
Comment 1 Kyle M Hall (khall) 2024-09-19 13:37:09 UTC
Created attachment 171756 [details] [review]
Bug 37885: Add ability to disable message queue processing

There exist services that libraries utilize as an alternative to processing the message queue.
These services may utilize the queued messages and send them from outside of Koha.
Sometimes these services utilize the API or reports while other times they utilize a plugin.
It would be beneficial to be able to disable running the message queue processor altogether,
or to only execute the plugin hook related to message queue processing ( before_send_messages )
to limit the processing of messages to those handled by plugins.

Test Plan:
1)  Apply this patch
2)  Run updatedatabase.pl
3)  Install the kitchen sink plugin, enable it
4)  Enqueue a notice
5)  Set MessageQueueMode to "process nothing"
6)  Run process_message_queue.pl
7)  Note nothing happens, 0 message reported
8)  Set MessageQueueMode to "process plugin hooks only"
9)  Run process_message_queue.pl
10) Note nothing happens, 0 message reported
11) Set MessageQueueMode to "on"
12) Run process_message_queue.pl
13) Note the message fails to send, assuming you have not set
    up anything to actually send messages on your test instance
Comment 2 Kyle M Hall (khall) 2024-09-19 13:41:03 UTC
Created attachment 171757 [details] [review]
Bug 37885: Add ability to disable message queue processing

There exist services that libraries utilize as an alternative to processing the message queue.
These services may utilize the queued messages and send them from outside of Koha.
Sometimes these services utilize the API or reports while other times they utilize a plugin.
It would be beneficial to be able to disable running the message queue processor altogether,
or to only execute the plugin hook related to message queue processing ( before_send_messages )
to limit the processing of messages to those handled by plugins.

Test Plan:
1)  Apply this patch
2)  Run updatedatabase.pl
3)  Install the kitchen sink plugin, enable it
4)  Enqueue a notice
5)  Set MessageQueueMode to "process nothing"
6)  Run process_message_queue.pl
7)  Note nothing happens, 0 message reported
8)  Set MessageQueueMode to "process plugin hooks only"
9)  Run process_message_queue.pl
10) Note nothing happens, 0 message reported
11) Set MessageQueueMode to "on"
12) Run process_message_queue.pl
13) Note the message fails to send, assuming you have not set
    up anything to actually send messages on your test instance
Comment 3 Kyle M Hall (khall) 2024-09-19 18:32:46 UTC
Created attachment 171789 [details] [review]
Bug 37885: Add ability to disable message queue processing

There exist services that libraries utilize as an alternative to processing the message queue.
These services may utilize the queued messages and send them from outside of Koha.
Sometimes these services utilize the API or reports while other times they utilize a plugin.
It would be beneficial to be able to disable running the message queue processor altogether,
or to only execute the plugin hook related to message queue processing ( before_send_messages )
to limit the processing of messages to those handled by plugins.

Test Plan:
1)  Apply this patch
2)  Run updatedatabase.pl
3)  Install the kitchen sink plugin, enable it
4)  Enqueue a notice
5)  Set MessageQueueMode to "process nothing"
6)  Run process_message_queue.pl
7)  Note nothing happens, 0 message reported
8)  Set MessageQueueMode to "process plugin hooks only"
9)  Run process_message_queue.pl
10) Note nothing happens, 0 message reported
11) Set MessageQueueMode to "on"
12) Run process_message_queue.pl
13) Note the message fails to send, assuming you have not set
    up anything to actually send messages on your test instance