public AnalogyMessageConsumer(string address) { //using var channel = GrpcChannel.ForAddress("http://localhost:6000"); channel = GrpcChannel.ForAddress(address); client = new Analogy.AnalogyClient(channel); AnalogyConsumerMessage m = new AnalogyConsumerMessage { Message = "client" }; _stream = client.SubscribeForConsumingMessages(m); }
public AnalogyMessageConsumer(string address) { channel = new Channel(address, ChannelCredentials.Insecure); client = new Analogy.AnalogyClient(channel); AnalogyConsumerMessage m = new AnalogyConsumerMessage { Message = "client" }; _stream = client.SubscribeForConsumingMessages(m); consumer = Task.Factory.StartNew(GetMessages); }
public AnalogyMessageProducer(string address) { try { channel = new Channel(address, ChannelCredentials.Insecure); client = new Analogy.AnalogyClient(channel); stream = client.SubscribeForPublishingMessages(); } catch (Exception e) { OnError?.Invoke(this, $"Error creating gRPC Connection: {e.Message}"); } }
public AnalogyMessageProducer(string address) { try { // channel = GrpcChannel.ForAddress("http://localhost:6000"); channel = GrpcChannel.ForAddress(address); client = new Analogy.AnalogyClient(channel); stream = client.SubscribeForPublishingMessages(); } catch (Exception e) { OnError?.Invoke(this, $"Error creating gRPC Connection: {e}"); } }