View | Details | Raw Unified | Return to bug 26742
Collapse All | Expand All

(-)a/Koha/BackgroundJob.pm (-2 / +15 lines)
Lines 62-69 Connect to the message broker using default guest/guest credential Link Here
62
62
63
sub connect {
63
sub connect {
64
    my ( $self );
64
    my ( $self );
65
    my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } );
65
    my $hostname = 'localhost';
66
    $stomp->connect( { login => 'guest', passcode => 'guest' } );
66
    my $port = '61613';
67
    my $username = 'guest';
68
    my $password = 'guest';
69
    my $vhost = '';
70
    my $config = C4::Context->config('message_broker');
71
    if ($config){
72
        $hostname = $config->{hostname} if $config->{hostname};
73
        $port = $config->{port} if $config->{port};
74
        $username = $config->{username} if $config->{username};
75
        $password = $config->{password} if $config->{password};
76
        $vhost = $config->{vhost} if $config->{vhost};
77
    }
78
    my $stomp = Net::Stomp->new( { hostname => $hostname, port => $port } );
79
    $stomp->connect( { login => $username, passcode => $password, host => $vhost } );
67
    return $stomp;
80
    return $stomp;
68
}
81
}
69
82
(-)a/debian/templates/koha-conf-site.xml.in (+8 lines)
Lines 453-457 __END_SRU_PUBLICSERVER__ Link Here
453
    <debug>__SMTP_DEBUG__</debug>
453
    <debug>__SMTP_DEBUG__</debug>
454
 </smtp_server>
454
 </smtp_server>
455
455
456
 <message_broker>
457
   <hostname>localhost</hostname>
458
   <port>61613</port>
459
   <username>guest</username>
460
   <password>guest</password>
461
   <vhost></vhost>
462
 </message_broker>
463
456
</config>
464
</config>
457
</yazgfs>
465
</yazgfs>
(-)a/etc/koha-conf.xml (-1 / +8 lines)
Lines 270-274 __PAZPAR2_TOGGLE_XML_POST__ Link Here
270
    <debug>__SMTP_DEBUG__</debug>
270
    <debug>__SMTP_DEBUG__</debug>
271
 </smtp_server>
271
 </smtp_server>
272
272
273
 <message_broker>
274
   <hostname>localhost</hostname>
275
   <port>61613</port>
276
   <username>guest</username>
277
   <password>guest</password>
278
   <vhost></vhost>
279
 </message_broker>
280
273
</config>
281
</config>
274
</yazgfs>
282
</yazgfs>
275
- 

Return to bug 26742