Bug 26742 - Add configuration for message broker
Summary: Add configuration for message broker
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on: 22417
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-20 00:42 UTC by David Cook
Modified: 2020-11-22 22:12 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 26742: Add configuration to koha-conf.xml for message broker (2.71 KB, patch)
2020-10-20 00:56 UTC, David Cook
Details | Diff | Splinter Review
Bug 26742: Add configuration to koha-conf.xml for message broker (2.91 KB, patch)
2020-10-20 01:35 UTC, David Cook
Details | Diff | Splinter Review
Bug 26742: Add configuration to koha-conf.xml for message broker (2.95 KB, patch)
2020-11-21 12:50 UTC, Michal Denar
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-10-20 00:42:08 UTC
It should be possible to configure the message broker.

While an out of the box install may run the message broker on the same host as Koha, this is not a recommended scenario. It's better to have the message broker on a separate host.
Comment 1 David Cook 2020-10-20 00:56:04 UTC
Created attachment 112013 [details] [review]
Bug 26742: Add configuration to koha-conf.xml for message broker

The connection details for the message broker should be configurable.
This patch adds configuration options to koha-conf.xml. If they
are not specified, then default connection details will be used.
Comment 2 David Cook 2020-10-20 01:35:59 UTC
Created attachment 112015 [details] [review]
Bug 26742: Add configuration to koha-conf.xml for message broker

The connection details for the message broker should be configurable.
This patch adds configuration options to koha-conf.xml. If they
are not specified, then default connection details will be used.
Comment 3 David Cook 2020-10-20 01:36:58 UTC
Test plan:

1. Apply the patch
2. koha-plack --restart kohadev
3. Go to http://localhost:8081/cgi-bin/koha/about.pl and check "Message broker" status says "running"
4. Edit /etc/koha/sites/kohadev/koha-conf.xml
5. Add the following:
<message_broker>
    <hostname>localhost</hostname>
    <port>61613</port>
    <username>guest</username>
    <password>guest</password>
    <vhost></vhost>
</message_broker>
6. echo 'flush_all' | nc -q 1 memcached 11211
7. koha-plack --restart kohadev
8. Go to http://localhost:8081/cgi-bin/koha/about.pl and check "Message broker" status says "running"
9. Edit /etc/koha/sites/kohadev/koha-conf.xml
10. Change message broker config to the following:
<message_broker>
    <hostname>badname</hostname>
    <port>40000</port>
    <username>guest</username>
    <password>guest</password>
    <vhost></vhost>
</message_broker>
11. echo 'flush_all' | nc -q 1 memcached 11211
12. koha-plack --restart kohadev
13. Go to http://localhost:8081/cgi-bin/koha/about.pl and check "Message broker" status says "connection failed"
Comment 4 Michal Denar 2020-11-21 12:50:34 UTC
Created attachment 113906 [details] [review]
Bug 26742: Add configuration to koha-conf.xml for message broker

The connection details for the message broker should be configurable.
This patch adds configuration options to koha-conf.xml. If they
are not specified, then default connection details will be used.

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 5 David Cook 2020-11-22 22:12:59 UTC
Thanks, Michal!