Turn Channel flow control off and on. Pass a callback to be notified of the response from the server. active is a bool. Callback should expect a bool in response indicating channel flow state. For more information, please reference: https://www.rabbitmq.com/amqp-0-9-
(self,
active: bool,
callback: Optional[_OnFlowCallback] = None)
| 800 | [spec.Exchange.UnbindOk] if not nowait else []) |
| 801 | |
| 802 | def flow(self, |
| 803 | active: bool, |
| 804 | callback: Optional[_OnFlowCallback] = None) -> None: |
| 805 | """Turn Channel flow control off and on. Pass a callback to be notified |
| 806 | of the response from the server. active is a bool. Callback should |
| 807 | expect a bool in response indicating channel flow state. For more |
| 808 | information, please reference: |
| 809 | |
| 810 | https://www.rabbitmq.com/amqp-0-9-1-reference.html#channel.flow |
| 811 | |
| 812 | :param bool active: Turn flow on or off |
| 813 | :param callable callback: callback(bool) upon completion |
| 814 | :raises ValueError: |
| 815 | |
| 816 | """ |
| 817 | self._raise_if_not_open() |
| 818 | validators.rpc_completion_callback(callback) |
| 819 | self._on_flowok_callback = callback |
| 820 | self._rpc(spec.Channel.Flow(active), self._on_flowok, |
| 821 | [spec.Channel.FlowOk]) |
| 822 | |
| 823 | @property |
| 824 | def is_closed(self) -> bool: |