コード例 #1
0
 private void OnListenerRegistered(object sender, ListenerRegisteredEventArgs e)
 {
     this.Receivers
     .Where(r => r is RabbitReceiver)
     .Cast <RabbitReceiver>()
     .ForEach(r =>
     {
         // If some of the receivers are configured to receive messages of different types from the same source (queue) then each receiver should have a corresponding listener attached to that source to let the consuming actions of listeners execute.
         r.RegisterListener(e.Listener);
     });
 }
コード例 #2
0
ファイル: RabbitBus.cs プロジェクト: Sliborskii/Contour
        private void OnListenerRegistered(object sender, ListenerRegisteredEventArgs e)
        {
            this.Receivers
            .Where(r => r is RabbitReceiver)
            .Cast <RabbitReceiver>()
            .ForEach(r =>
            {
                // Since some of the configuration options are evaluated on receiver start the bus needs to check if a newly registered listener of each receiver is compatible with the rest of the receivers. Compatibility check list is defined by the receiver itself.
                r.CheckIfCompatible(e.Listener);

                // If some of the receivers are configured to receive messages of different types from the same source (queue) then each receiver should have a corresponding listener attached to that source to let the consuming actions of listeners execute.
                r.RegisterListener(e.Listener);
            });
        }