Reputation: 73
I have a class that creates a connection to RabbitMQ and has a method that contains the below code.
I pull 5 million records from a database and iterates them in a loop calling the below code to push the records into a RabbitMQ queue.
After a couple million messages can no longer send and repetitively get "[Errno 98] Address already in use"
self.mq_conn = BlockingConnection(ConnectionParameters(host=self.mq_host, credentials=PlainCredentials(self.mq_username, self.mq_password)))
self.mq_channel = self.mq_conn.channel()
self.mq_channel.basic_publish(exchange='myqueue', routing_key='', body=ad, properties=BasicProperties(delivery_mode=spec.PERSISTENT_DELIVERY_MODE,))
Does anyone have any ideas fort me ?
Thanks in advance !
Upvotes: 0
Views: 16