Complete the code to enable flow control on a RabbitMQ channel.
channel.[1]()The flow() method is used to enable or disable flow control on a RabbitMQ channel.
Complete the code to disable flow control on a RabbitMQ channel.
channel.[1](False)
Passing False to the flow() method disables flow control on the channel.
Fix the error in the code to correctly check if flow control is active.
if channel.[1]() == False: print('Flow control is active')
The flow() method returns the current flow control state when called without arguments.
Fill both blanks to pause and then resume message flow on the channel.
channel.[1](False) channel.[2](True)
The flow(False) pauses message flow, and flow(True) resumes it on the channel.
Fill all three blanks to create a flow control handler that pauses flow when buffer is full and resumes when cleared.
def flow_control_handler(channel, [1]): if [2]: channel.[3](False) else: channel.flow(True)
The handler uses a parameter is_buffer_full to check buffer state and calls flow(False) to pause flow.