コード例 #1
0
 public ConsumerFactory(IAmACommandProcessor commandProcessor, IAmAMessageMapperRegistry messageMapperRegistry, Connection connection)
 {
     _commandProcessor      = commandProcessor;
     _messageMapperRegistry = messageMapperRegistry;
     _connection            = connection;
     _consumerName          = new ConsumerName($"{_connection.Name}-{DateTime.Now.Ticks}");
 }
コード例 #2
0
ファイル: ConsumerFactory.cs プロジェクト: preardon/Brighter
 public ConsumerFactory(IAmACommandProcessorProvider commandProcessorProvider, IAmAMessageMapperRegistry messageMapperRegistry, Subscription subscription)
 {
     _commandProcessorProvider = commandProcessorProvider;
     _messageMapperRegistry    = messageMapperRegistry;
     _subscription             = subscription;
     _consumerName             = new ConsumerName($"{_subscription.Name}-{Guid.NewGuid()}");
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Consumer"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="subscriptionName">The name of the associated subscription.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="messagePump">The message pump.</param>
 public Consumer(ConsumerName name, SubscriptionName subscriptionName, IAmAChannel channel, IAmAMessagePump messagePump)
 {
     Name             = name;
     SubscriptionName = subscriptionName;
     Performer        = new Performer(channel, messagePump);
     State            = ConsumerState.Shut;
 }
コード例 #4
0
 public ConsumerFactory(IAmACommandProcessor commandProcessor, IAmAMessageMapperRegistry messageMapperRegistry, Connection connection)
 {
     _commandProcessor      = commandProcessor;
     _messageMapperRegistry = messageMapperRegistry;
     _connection            = connection;
     _consumerName          = new ConsumerName($"{_connection.Name}-{Guid.NewGuid()}");
 }
コード例 #5
0
ファイル: Consumer.cs プロジェクト: slang25/Paramore
 /// <summary>
 /// Initializes a new instance of the <see cref="Consumer"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="connectionName">The name of the associated connection.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="messagePump">The message pump.</param>
 public Consumer(ConsumerName name, ConnectionName connectionName, IAmAChannel channel, IAmAMessagePump messagePump)
 {
     Name           = name;
     ConnectionName = connectionName;
     Performer      = new Performer(channel, messagePump);
     State          = ConsumerState.Shut;
 }