internal AmqpEventDataSender(AmqpEventHubClient eventHubClient, string partitionId)
            : base(eventHubClient, partitionId)
        {
            this.Path = !string.IsNullOrEmpty(partitionId)
                ? $"{eventHubClient.EventHubName}/Partitions/{partitionId}"
                : eventHubClient.EventHubName;

            this.SendLinkManager   = new FaultTolerantAmqpObject <SendingAmqpLink>(this.CreateLinkAsync, this.CloseSession);
            this.clientLinkManager = new ActiveClientLinkManager((AmqpEventHubClient)this.EventHubClient);
            this.MaxMessageSize    = 256 * 1024; // Default. Updated when link is opened
        }
        internal AmqpEventDataSender(AmqpEventHubClient eventHubClient, string partitionId)
            : base(eventHubClient, partitionId)
        {
            if (!string.IsNullOrEmpty(partitionId))
            {
                this.Path = $"{eventHubClient.EventHubName}/Partitions/{partitionId}";
            }
            else
            {
                this.Path = eventHubClient.EventHubName;
            }

            this.SendLinkManager   = new FaultTolerantAmqpObject <SendingAmqpLink>(this.CreateLinkAsync, this.CloseSession);
            this.clientLinkManager = new ActiveClientLinkManager((AmqpEventHubClient)this.EventHubClient);
        }
示例#3
0
        public AmqpPartitionReceiver(
            AmqpEventHubClient eventHubClient,
            string consumerGroupName,
            string partitionId,
            EventPosition eventPosition,
            long?epoch,
            ReceiverOptions receiverOptions)
            : base(eventHubClient, consumerGroupName, partitionId, eventPosition, epoch, receiverOptions)
        {
            string entityPath = eventHubClient.ConnectionStringBuilder.EntityPath;

            this.Path = $"{entityPath}/ConsumerGroups/{consumerGroupName}/Partitions/{partitionId}";
            this.ReceiveLinkManager = new FaultTolerantAmqpObject <ReceivingAmqpLink>(this.CreateLinkAsync, this.CloseSession);
            this.receivePumpLock    = new object();
            this.clientLinkManager  = new ActiveClientLinkManager((AmqpEventHubClient)this.EventHubClient);
        }
示例#4
0
        public AmqpPartitionReceiver(
            AmqpEventHubClient eventHubClient,
            string consumerGroupName,
            string partitionId,
            string startOffset,
            bool offsetInclusive,
            DateTime?startTime,
            long?epoch)
            : base(eventHubClient, consumerGroupName, partitionId, startOffset, offsetInclusive, startTime, epoch)
        {
            string entityPath = eventHubClient.ConnectionStringBuilder.EntityPath;

            this.Path = $"{entityPath}/ConsumerGroups/{consumerGroupName}/Partitions/{partitionId}";
            this.ReceiveLinkManager = new FaultTolerantAmqpObject <ReceivingAmqpLink>(this.CreateLinkAsync, this.CloseSession);
            this.receivePumpLock    = new object();
            this.clientLinkManager  = new ActiveClientLinkManager((AmqpEventHubClient)this.EventHubClient);
        }
 public TokenProviderAdapter(AmqpEventHubClient eventHubClient)
 {
     Fx.Assert(eventHubClient != null, "tokenProvider cannot be null");
     this.eventHubClient = eventHubClient;
 }
 public ActiveClientLinkManager(AmqpEventHubClient eventHubClient)
 {
     this.eventHubClient = eventHubClient;
     this.validityTimer  = new Timer(OnLinkExpiration, this, Timeout.Infinite, Timeout.Infinite);
     this.syncRoot       = new object();
 }