[Koha-bugs] [Bug 22417] Delegate background jobs execution
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 1 03:09:41 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22417
--- Comment #15 from David Cook <dcook at prosentient.com.au> ---
(In reply to Jonathan Druart from comment #13)
> (In reply to Tomás Cohen Arazi from comment #12)
> > I agree with David that this of course would require a single RabbitMQ
> > server so questions: Is there a concept of namespaces? can any Koha instance
> > access other instance's messages?
>
> I really would like you guys to apply, read and try the patches, read the
> code, then discuss :)
> There are a lot of FIXME and TODO.
>
> This one answers your question:
>
> 16 sub connect {
> 17 my ( $self );
> 18 my $conn = Net::RabbitFoot->new()->load_xml_spec()->connect(
> 19 host => 'localhost', # TODO Move this to KOHA_CONF
> 20 port => 5672,
> 21 user => 'guest',
> 22 pass => 'guest',
> 23 vhost => '/',
> 24 );
> 25
> 26 return $conn;
> 27 }
>
> So different vhost, user and pass can be used.
I haven't tried the patches but I have read your code, and that's why I've
voiced my concerns about multi-tenancy. There wasn't enough information there
to understand, so that's why I asked the questions.
Your reply almost answers the question, but not quite, so now I'm just reading
about RabbitMQ.
If I understand correctly, each Koha instance would get its own RabbitMQ
"vhost", and within each "vhost" there would be named queues (which at the
moment are hard-coded but could be configurable I suppose).
Cool. That removes my concerns about multi-tenancy. Thanks for that, Jonathan.
(Maybe in your example you could use something like "vhost => '/kohademo'" or
maybe include some code comments just so it's more obvious how it works.)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list