AMQP does not close channels

Asked by DarkAnthey

I use the following to send messages to client:

    @defer.inlineCallbacks
    def amqpSend(self, userAmqpKey, name_method, user_res):
        thrift_client = yield self.CreateThriftClient(self.amqp_client, userAmqpKey)
        send_func = getattr(thrift_client, name_method)
        send_func(user_res)

    @defer.inlineCallbacks
    def prepareClient(self, client):
        channel = yield client.channel(1)
        yield channel.channel_open()
        yield channel.basic_qos(prefetch_count=1)
        self.pfactory = TBinaryProtocol.TBinaryProtocolFactory()

    @defer.inlineCallbacks
    def CreateThriftClientToServer(self, client):
        thriftClient = yield client.createThriftClient(self.ini.responsesExchange, self.ini.servicesExchange, self.ini.tournamentKey, tournaments.Tournaments.Client, iprot_factory=self.pfactory, oprot_fa
        defer.returnValue(thriftClient)

I expect the channels to be closed but they are open.

# rabbitmqctl list_channels
<email address hidden> guest false 0 0
<email address hidden> guest false 1 0
<email address hidden> guest false 1118 0

It leads to channels locking.

# rabbitmqctl list_connections
guest 127.0.0.1 48892 locked
guest 127.0.0.1 48875 locked
guest 127.0.0.1 48866 locked

Is it a bug. If so how can I make it to work correctly?

Question information

Language:
English Edit question
Status:
Solved
For:
txAMQP Edit question
Assignee:
No assignee Edit question
Solved by:
DarkAnthey
Solved:
Last query:
Last reply:
Revision history for this message
DarkAnthey (darkanthey) said :
#1

Fix txamqp/contrib/thrift/transport.py Line 25

        self.channel.basic_publish(exchange=self.exchange,
            routing_key=self.routingKey, content=content, mandatory=False)