Closed BhusanBibhuti closed 2 years ago
NetMQ Version: 4.0.1.10 Operating System: Windows Server 2016 .NET Version: NET 5
Client sends message without any issue
Server sends back acknowledhment
Create Client Worker Service , host it on a machine
protected override async Task ExecuteAsync(CancellationToken stoppingToken) { /*string endpointLocal = @"127.0.0.1:5678";*/ string endpointRemote = @"10.83.219.120:5678"; /*IP of the server machine*/ string sampleMessage = "Hello World"; while (!stoppingToken.IsCancellationRequested) { using (var client = new RequestSocket($">tcp://{endpointRemote}")) { _logger.LogInformation("Attempting to send NetMQ Message "); client.SendFrame(JsonConvert.SerializeObject(sampleMessage)); _logger.LogInformation("Attempting to send NetMQ Message - Sent "); _logger.LogInformation("Awaiting response from NetMQ Message server - Started "); string response = client.ReceiveFrameString(); _logger.LogInformation("Awaiting response from NetMQ Message server - Finished "); if (!string.IsNullOrEmpty(response)) { _logger.LogInformation("Saving client configuration"); } }
Create Server Worker Service , host it on server machine
protected override async Task ExecuteAsync(CancellationToken stoppingToken) { /*string endpointLocal = @"127.0.0.1:5678";*/ string endpointRemote = @"10.83.219.120:5678"; /*IP of the server machine*/ while (!stoppingToken.IsCancellationRequested) { _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); using (var server = new ResponseSocket($"@tcp://{endpointRemote}")) { while (true) { try { _logger.LogInformation($"Receiving Message"); string jsonMessage = server.ReceiveFrameString(); var message = JsonConvert.DeserializeObject<string>(jsonMessage); server.SendFrame(JsonConvert.SerializeObject("Sending ACK..")); } catch (Exception exception) { _logger.LogError(exception, "Unable to process"); } } } } }
It works fine when both the services are hosted on the same machine , doesn't work when hosted under different machines.
ClientWorkerService.zip
HI Team , any further updates on this ?
Closing the issue , since it was identified an issue with the firewall. This has been fixed.
Environment
Expected behaviour
Client sends message without any issue
Server sends back acknowledhment
Actual behaviour
Steps to reproduce the behaviour
Create Client Worker Service , host it on a machine
Create Server Worker Service , host it on server machine
It works fine when both the services are hosted on the same machine , doesn't work when hosted under different machines.
ClientWorkerService.zip