Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some times, channel.queue_bind() takes 3 seconds #18

Open
simon-liu opened this issue Jan 8, 2013 · 2 comments
Open

some times, channel.queue_bind() takes 3 seconds #18

simon-liu opened this issue Jan 8, 2013 · 2 comments

Comments

@simon-liu
Copy link

Here is the code:

    import time

    t0 = time.time()
    conn = Connection(host=conf.host, port=conf.port)

    t1 = time.time()
    channel = conn.channel()
    t2 = time.time()
    channel.exchange_declare(exchange=conf.exchange, type=conf.type, durable=conf.durable)
    t3 = time.time()
    channel.queue_declare(queue=conf.queue, durable=conf.durable)
    t4 = time.time()
    channel.queue_bind(queue=conf.queue, exchange=conf.exchange, routing_key=conf.routing_key)
    t5 = time.time()
    if t5 - t0 > 2:
        logger.info("Connection(): %s, conn.channel(): %s, channel.exchange_declare(): %s, channel.queue_declare(): %s, channel.queue_bind() %s", t5 - t4, t4 - t3, t3 - t2, t2 - t1, t1 - t0)

the log prints:
2013-01-08 18:18:00,229 INFO Connection(): 0.00176000595093, conn.channel(): 0.000516176223755, channel.exchange_declare(): 0.000393867492676, channel.queue_declare(): 0.000674962997437, channel.queue_bind() 3.14228796959

@ask
Copy link
Contributor

ask commented Jan 9, 2013

Is this specific to librabbitmq though? I have seen the same before and rabbitmq developers told me it could be due to fsync.

@simon-liu
Copy link
Author

sorry, I made a mistake, t1 - t0 is connecting time, not queue_bind time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants