public async Task ConsumeAsync(IntegrationEvent <BookingCreated> integrationEvent) { Console.WriteLine("New Message BookingCreated has been recieved"); Console.WriteLine(integrationEvent.ToString()); Console.WriteLine($"BookingName is {integrationEvent.Content.BookingName}"); await Task.Delay(10000); }
public async Task ConsumeAsync(IntegrationEvent <JObject> integrationEvent) { logger.Debug($"New Message of type {integrationEvent.EventType} " + $"has been recieved through dynamic interface"); logger.Debug(integrationEvent.ToString()); logger.Debug($"RelationshipId is { integrationEvent.Content["RelationshipId"].Value<string>()}"); await Task.Delay(10000); }
public async Task ConsumeAsync(IntegrationEvent <RelationshipCreated> integrationEvent) { logger.Debug($"New Message of type {integrationEvent.EventType} " + $"has been recieved through typed interface"); logger.Debug(integrationEvent.ToString()); logger.Debug($"RelationshipId is {integrationEvent.Content.RelationshipId}"); await Task.Delay(10000); }
public async Task Publish(IntegrationEvent integrationEvent) { if (this.producerClient.IsClosed) { this.InitializeEvntHubProducer(this.settings.EventHubSettings.ConnectionString, this.settings.EventHubSettings.EventHubName); } using EventDataBatch eventBatch = await producerClient.CreateBatchAsync(); eventBatch.TryAdd(new EventData(Encoding.UTF8.GetBytes(integrationEvent.ToString()))); await producerClient.SendAsync(eventBatch); }
public void Publish(IntegrationEvent @event) { System.Console.WriteLine(@event.ToString()); }
public async Task Handle(IntegrationEvent <CommandResponse> @event) { await Task.Run(() => WebSocketOutlet.AddToBuffer("just recieved event: " + @event.ToString())); }