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

            SendLinkManager    = new FaultTolerantAmqpObject <SendingAmqpLink>(CreateLinkAsync, CloseSession);
            _clientLinkManager = new ActiveClientLinkManager((AmqpEventHubClient)EventHubClient);
            MaxMessageSize     = 256 * 1024; // Default. Updated when link is opened
        }
        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;

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