Esempio n. 1
0
        public async Task RunAsync(MeasurementGenerator generator, int count)
        {
            var router = new IngressRouter.IngressRouterClient(this.m_channel);

            while (true)
            {
                var measurements = generator.GenerateMeasurementData(count);
                await router.EnqueueBulkMeasurementsAsync(measurements, Metadata.Empty);
            }
        }
        public async Task <RoutingResponse> RouteAsync(TextMessageData data, CancellationToken ct)
        {
            var client = new IngressRouter.IngressRouterClient(this.m_channel);

            return(await client.EnqueueBulkMessagesAsync(data, cancellationToken : ct));
        }