Try RabbitMQ without VPN IP

This commit is contained in:
Noe 2023-11-02 16:46:18 +01:00
parent 1d5578ad9a
commit a2155ee086
3 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,7 @@ public static class RabbitMqConsumer
public static void StartRabbitMqConsumer(Dictionary<Int32, InstallationInfo> installationConnections, Object sharedDataLock)
{
string vpnServerIp = "10.2.0.11";
string vpnServerIp = "194.182.190.208";
_factory = new ConnectionFactory { HostName = vpnServerIp };
_connection = _factory.CreateConnection();
_channel = _connection.CreateModel();
@ -34,6 +34,7 @@ public static class RabbitMqConsumer
// Process the received message
if (receivedStatusMessage != null)
{
Console.WriteLine("Received a message from installation:"+receivedStatusMessage);
Console.WriteLine("Received a message from installation: " + receivedStatusMessage.InstallationId + " and status is: " + receivedStatusMessage.Status);
Console.WriteLine("----------------------------------------------");
Console.WriteLine("Update installation connection table");

View File

@ -0,0 +1 @@
dotnet publish Middleware.csproj -c Release -r linux-x64 --self-contained true -p:PublishTrimmed=false && rsync -av bin/Release/net6.0/linux-x64/publish/ ubuntu@194.182.190.208:~/middleware

View File

@ -49,7 +49,7 @@ internal static class Program
private static readonly Channel RelaysChannel ;
private static readonly Channel BatteriesChannel ;
private const String VpnServerIp = "10.2.0.11";
private const String VpnServerIp = "194.182.190.208";
private static IPAddress? _controllerIpAddress;
private static UdpClient _udpListener;