Ejemplo n.º 1
0
 public async Task SendAndReceiveFromSQS()
 {
     var options = new SqsOptions
     {
         ConnectionString = AWSTestConstants.DefaultSQSConnectionString,
     };
     var adapterFactory = new SQSAdapterFactory(SQS_STREAM_PROVIDER_NAME, options, new HashRingStreamQueueMapperOptions(), new SimpleQueueCacheOptions(), null, Options.Create(new ClusterOptions()), null, null);
     adapterFactory.Init();
     await SendAndReceiveFromQueueAdapter(adapterFactory);
 }
Ejemplo n.º 2
0
 public SQSAdapterFactory(
     string name,
     SqsOptions sqsOptions,
     HashRingStreamQueueMapperOptions queueMapperOptions,
     SimpleQueueCacheOptions cacheOptions,
     IOptions <ClusterOptions> clusterOptions,
     Orleans.Serialization.Serializer serializer,
     ILoggerFactory loggerFactory)
 {
     this.providerName   = name;
     this.sqsOptions     = sqsOptions;
     this.clusterOptions = clusterOptions.Value;
     this.serializer     = serializer.GetSerializer <SQSBatchContainer>();
     this.loggerFactory  = loggerFactory;
     streamQueueMapper   = new HashRingBasedStreamQueueMapper(queueMapperOptions, this.providerName);
     adapterCache        = new SimpleQueueAdapterCache(cacheOptions, this.providerName, this.loggerFactory);
 }
Ejemplo n.º 3
0
 public SQSAdapterFactory(
     string name,
     SqsOptions sqsOptions,
     HashRingStreamQueueMapperOptions queueMapperOptions,
     SimpleQueueCacheOptions cacheOptions,
     IServiceProvider serviceProvider,
     IOptions <ClusterOptions> clusterOptions,
     SerializationManager serializationManager,
     ILoggerFactory loggerFactory)
 {
     this.providerName         = name;
     this.sqsOptions           = sqsOptions;
     this.clusterOptions       = clusterOptions.Value;
     this.serializationManager = serializationManager;
     this.loggerFactory        = loggerFactory;
     streamQueueMapper         = new HashRingBasedStreamQueueMapper(queueMapperOptions, this.providerName);
     adapterCache = new SimpleQueueAdapterCache(cacheOptions, this.providerName, this.loggerFactory);
 }