def __init__(self, host="", reconnectionTimer=reconnectiontimers.CreateLogarithmicTimer(), maxReconnections=Channel.MAX_RECONNECTIONS, compressor=compressors.DefaultCompressor(), useAck=False): Channel.__init__(self, host, reconnectionTimer, maxReconnections, compressor, useAck) Startable.__init__(self) self._thReceive = threading.Thread(target=self.__workReceive) self.OnMessageReceived = EventHook() self.OnStart += self.__beginReceive self.OnStopped += self.__endReceive
def __init__(self, queue, channels=list(), numExtractors=4): Startable.__init__(self) self._channels = list() self._queue = queue self.OnConnectionError = EventHook() for channel in channels: self.addChannel(channel) self._thExtractors = list() for count in range(0, numExtractors): self._thExtractors.append(threading.Thread(target=self._process_queue))
def __init__(self, queue, channels=list(), numExtractors=4): Startable.__init__(self) self._channels = list() self._queue = queue self.OnConnectionError = EventHook() for channel in channels: self.addChannel(channel) self._thExtractors = list() for count in range(0, numExtractors): self._thExtractors.append( threading.Thread(target=self._process_queue))
def __init__(self, host="", reconnectionTimer=reconnectiontimers.CreateLogarithmicTimer(), maxReconnections=Channel.MAX_RECONNECTIONS, compressor=compressors.DefaultCompressor(), useAck=False): Channel.__init__(self, host, reconnectionTimer, maxReconnections, compressor, useAck) Startable.__init__(self) self._thReceive = threading.Thread(target=self.__workReceive) self.OnMessageReceived = EventHook() self.OnStart += self.__beginReceive self.OnStopped += self.__endReceive