using System; using System.Threading.Tasks; using SharedModule; using Volo.Abp.DependencyInjection; using Volo.Abp.EventBus.Distributed; namespace App2 { public class App2TextEventHandler : IDistributedEventHandler, ITransientDependency { private readonly IDistributedEventBus _distributedEventBus; public App2TextEventHandler(IDistributedEventBus distributedEventBus) { _distributedEventBus = distributedEventBus; } public Task HandleEventAsync(TextEventData eventData) { Console.WriteLine("************************ INCOMING MESSAGE ****************************"); Console.WriteLine(eventData.TextMessage); Console.WriteLine("**********************************************************************"); _distributedEventBus.PublishAsync( new TextReceivedEventData { ReceivedText = eventData.TextMessage } ); return Task.CompletedTask; } } }