Page 1 of 1

AMQP Databroadcaster with different databases

PostPosted: Tue Mar 28, 2023 5:34 pm
by sbutler
In the docs example they show the databroadcaster being used with a load balancer and multiple servers, assumingly hosting the exact same solutions and database servers. https://wiki.servoy.com/display/DOCS/AM ... t+messages

Can it also be used to broadcast between servers with some shared and some different databases or will it throw a bunch of errors? I have 1 Servoy server with 3 DB connections, and another Servoy server with 5 DB connections. They share ONLY 1 of the connections (same connection name and database). Will the databroadcaster plugin work in the situation? Also is there a way to configure the databroadcaster to only broadcast some db connections and not all?

Re: AMQP Databroadcaster with different databases

PostPosted: Tue Mar 28, 2023 7:22 pm
by steve1376656734
Hi Scott,

Based on our experience, the data broadcaster will enable both servers to get the updates for the shared DB but each server will also write an entry in the log file for each data broadcast it receives for the DBs not present on that machine. If you're happy to ignore those messages then you should be fine.

Steve

Re: AMQP Databroadcaster with different databases

PostPosted: Tue Mar 28, 2023 7:25 pm
by steve1376656734
Forgot to mention:

Our scenario is slightly different to yours in that we have two different applications deployed on the same server (in different Tomcat contexts) that share a common DB and we use the RabbitMQ to data broadcast between them. Not the exact same scenario as yours but in principle it is the same because the two Tomcat contexts might as well be on different servers as far as Servoy is concerned.

Re: AMQP Databroadcaster with different databases

PostPosted: Wed Mar 29, 2023 1:12 pm
by jcompagner
i looked at the code a bit and i think you will be hitting this:

else
{
Debug.error("Could not find server '" + server_name + "'");
}

besides that log i think it should work fine because we don't find any clients for that server/table

Re: AMQP Databroadcaster with different databases

PostPosted: Wed Mar 29, 2023 1:24 pm
by steve1376656734
@jcompagner

Any chance you could downgrade that message to INFO - it would help a lot with our log file analysis.

Re: AMQP Databroadcaster with different databases

PostPosted: Thu Mar 30, 2023 10:25 pm
by sbutler
jcompagner wrote:i looked at the code a bit and i think you will be hitting this:

else
{
Debug.error("Could not find server '" + server_name + "'");
}

besides that log i think it should work fine because we don't find any clients for that server/table


Thanks. Would be nice if there was like a "amqpbroadcaster.broadcastServers" with a comma separated list of database server names to broadcast, and if not set, it does all like it currently does. That would save broadcasting the messages and the log issue. Looks like just a small tweak somewhere around here: https://github.com/Servoy/servoy-extens ... .java#L241

Re: AMQP Databroadcaster with different databases

PostPosted: Fri Mar 31, 2023 12:27 pm
by steve1376656734
That is a MUCH better idea.

Are you going to create a ticket for it?