コード例 #1
0
            public void OnConnectionClosed(ITcpConnection connection, SocketError socketError)
            {
                var consumerId = ClientIdFactory.CreateClientId(connection.RemotingEndPoint as IPEndPoint);

                if (_brokerController.Setting.RemoveConsumerWhenDisconnect)
                {
                    _brokerController._consumerManager.RemoveConsumer(consumerId);
                }
            }
コード例 #2
0
 private string GetProducerId()
 {
     if (string.IsNullOrWhiteSpace(Name))
     {
         return(ClientIdFactory.CreateClientId(_remotingClient.LocalEndPoint as IPEndPoint));
     }
     else
     {
         var ipSuffix = ClientIdFactory.CreateClientId(_remotingClient.LocalEndPoint as IPEndPoint);
         return(string.Format("{0}_{1}", Name, ipSuffix));
     }
 }
コード例 #3
0
 private string GetConsumerId()
 {
     return(ClientIdFactory.CreateClientId(_remotingClient.LocalEndPoint as IPEndPoint));
 }
コード例 #4
0
            public void OnConnectionClosed(ITcpConnection connection, SocketError socketError)
            {
                var producerId = ClientIdFactory.CreateClientId(connection.RemotingEndPoint as IPEndPoint);

                _brokerController._producerManager.RemoveProducer(producerId);
            }