How connection.process_data_events works ? (pika1.10.0, python)

1,387 views
Skip to first unread message

moshe cohen

unread,
Aug 14, 2019, 3:38:26 AM8/14/19
to rabbitmq-users
Hi,

my program were suffering from missing heartbeats every once in a while causing my connection to disconnect (i use try, except to reconnect but its not the solution im looking for)

when i use process_data_events() manually after X msgs or few seconds i successfully sending and replying heartbeats.

my questions is how the process_data_events method works ?
what is the difference between this method and the connection.sleep() method ?

do i need to add sleep() timeouts after process_data_events()


i use python with pika 1.10.0 package.

thanks :)

moshe.

moshe cohen

unread,
Aug 25, 2019, 5:20:08 AM8/25/19
to rabbitmq-users
anyone ?? 

:(

Luke Bakken

unread,
Aug 26, 2019, 11:19:12 AM8/26/19
to rabbitmq-users
Hi Moshe,

More than likely your code is blocking Pika's I/O loop. If you could provide code to reproduce your issue, I could offer suggestions.

Thanks,
Luke

moshe cohen

unread,
Aug 27, 2019, 1:14:52 AM8/27/19
to rabbitmq-users
Hi luke,

i guess you were right, i did some adjustments in my code and in works and i dont miss any heartbeat.

my question is how the process_data_events works in pika ? what is the purpose of this method ?

thank,
moshe.

Luke Bakken

unread,
Aug 27, 2019, 11:51:59 AM8/27/19
to rabbitmq-users
Hi Moshe,

If your application is coded correctly, you should never have to use process_data_events.

If you think you have to use process_data_events, you should be using SelectConnection.


Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages