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); }