private void PublishMessage(AgentBrokerPayload data)
        {
            var context = data.Context ?? ApplicationMessageContext;
            var message = _messageConverter.ConvertMessage(data.Payload, context, data.Ordinal, data.Offset);

            _messagePublisher.PublishMessage(message); // TODO: Hook into offThread
        }
Beispiel #2
0
        public async Task PublishMessage(IMessage message)
        {
            // TODO: Probably not the best place to put this
            await _streamHubProxyFactory.Start();

            var newMessage = _messageConverter.ConvertMessage(message);

            await _streamHubProxy.Invoke("HandleMessage", newMessage);
        }
        public async Task PublishMessage(IMessage message)
        {
            // TODO: Needs error handelling
            // TODO: Find out what happened to System.Net.Http.Formmating - PostAsJsonAsync

            var newMessage = _messageConverter.ConvertMessage(message);

            var response = await _httpClient.PostAsJsonAsync("http://localhost:15999/Glimpse/Agent", newMessage);

            // Check that response was successful or throw exception
            response.EnsureSuccessStatusCode();

            // Read response asynchronously as JsonValue and write out top facts for each country
            var result = await response.Content.ReadAsStringAsync();
        }
        public async Task PublishMessage(IMessage message)
        {
            var newMessage = _messageConverter.ConvertMessage(message);

            await _messageBus.SendMessage(newMessage);
        }