public DefaultRpc( ConnectionConfiguration configuration, IAdvancedBus advancedBus, IEventBus eventBus, IConventions conventions, IExchangeDeclareStrategy exchangeDeclareStrategy, IMessageDeliveryModeStrategy messageDeliveryModeStrategy, ITypeNameSerializer typeNameSerializer, ICorrelationIdGenerationStrategy correlationIdGenerationStrategy ) { Preconditions.CheckNotNull(configuration, "configuration"); Preconditions.CheckNotNull(advancedBus, "advancedBus"); Preconditions.CheckNotNull(eventBus, "eventBus"); Preconditions.CheckNotNull(conventions, "conventions"); Preconditions.CheckNotNull(exchangeDeclareStrategy, "publishExchangeDeclareStrategy"); Preconditions.CheckNotNull(messageDeliveryModeStrategy, "messageDeliveryModeStrategy"); Preconditions.CheckNotNull(typeNameSerializer, "typeNameSerializer"); Preconditions.CheckNotNull(correlationIdGenerationStrategy, "correlationIdGenerationStrategy"); this.configuration = configuration; this.advancedBus = advancedBus; this.conventions = conventions; this.exchangeDeclareStrategy = exchangeDeclareStrategy; this.messageDeliveryModeStrategy = messageDeliveryModeStrategy; this.typeNameSerializer = typeNameSerializer; this.correlationIdGenerationStrategy = correlationIdGenerationStrategy; eventSubscription = eventBus.Subscribe <ConnectionRecoveredEvent>(OnConnectionRecovered); }
public MetaDataMessageSerializationStrategy(ITypeNameSerializer typeNameSerializer, ISerializer serializer, ICorrelationIdGenerationStrategy correlationIdGenerator) { _typeNameSerializer = typeNameSerializer ?? throw new ArgumentNullException(nameof(typeNameSerializer)); _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); _correlationIdGenerator = correlationIdGenerator ?? throw new ArgumentNullException(nameof(correlationIdGenerator)); _bindingCache = new ConcurrentDictionary <Type, List <IMetaDataBinding> >(); }
public DefaultMessageSerializationStrategy( ITypeNameSerializer typeNameSerializer, ICorrelationIdGenerationStrategy correlationIdGenerator) { this.typeNameSerializer = typeNameSerializer; this.correlationIdGenerator = correlationIdGenerator; serializer = SerializationHelper.MsgPack; }
public UntypedMessageSerializationStrategy( bool useCorrelationIds, ISerializer serializer, ICorrelationIdGenerationStrategy correlationIdGenerator) { _useCorrelationIds = useCorrelationIds; _serializer = serializer; _correlationIdGenerator = correlationIdGenerator; }
/// <summary> /// Creates DefaultMessageSerializationStrategy /// </summary> /// <param name="typeNameSerializer">The type name serialized</param> /// <param name="serializer">The serializer</param> /// <param name="correlationIdGenerator">The correlation id generator</param> public DefaultMessageSerializationStrategy( ITypeNameSerializer typeNameSerializer, ISerializer serializer, ICorrelationIdGenerationStrategy correlationIdGenerator ) { this.typeNameSerializer = typeNameSerializer; this.serializer = serializer; this.correlationIdGenerator = correlationIdGenerator; }
public MetaDataMessageSerializationStrategy(ITypeNameSerializer typeNameSerializer, ISerializer serializer, ICorrelationIdGenerationStrategy correlationIdGenerator) { if (typeNameSerializer == null) { throw new ArgumentNullException("typeNameSerializer"); } if (serializer == null) { throw new ArgumentNullException("serializer"); } if (correlationIdGenerator == null) { throw new ArgumentNullException("correlationIdGenerator"); } _typeNameSerializer = typeNameSerializer; _serializer = serializer; _correlationIdGenerator = correlationIdGenerator; _bindingCache = new ConcurrentDictionary <Type, List <IMetaDataBinding> >(); }