Skip to content

Commit 4410688

Browse files
author
Emile Joubert
committed
Specify criteria for safe methods in callbacks more precisely
1 parent 8c3df2e commit 4410688

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/wikipages/data.ApiOverview.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,16 @@ library. Such callbacks include:
347347
IModel] etc.
348348

349349
Application callback handlers [b must not] invoke blocking AMQP
350-
operations (such as [code IModel.QueueDeclare] or [code
351-
IModel.BasicCancel]). If they do, the channel will deadlock[footnote
352-
The underlying implementation reason is that the [code IBasicConsumer]
353-
callbacks are invoked in the connection's thread rather than in the
354-
application's thread.].
355-
356-
Only asynchronous AMQP operations are safe for use within callbacks,
357-
such as [code IModel.BasicAck]. It is not safe to use [code
358-
IModel.BasicPublish] in callbacks, because channel flow could block
359-
publication.
350+
operations (such as [code IModel.QueueDeclare], [code
351+
IModel.BasicCancel] or [code IModel.BasicPublish]). If they do, the
352+
channel will deadlock[footnote The underlying implementation reason
353+
is that the [code IBasicConsumer] callbacks are invoked in the connection's
354+
thread rather than in the application's thread.].
355+
356+
Only asynchronous AMQP operations without content are safe for use
357+
within callbacks, such as [code IModel.BasicAck]. It is not safe to
358+
use [code IModel.BasicPublish] in callbacks, because channel flow
359+
could block publication.
360360

361361
For this reason, [code QueueingBasicConsumer] is the safest way of
362362
subscribing to a queue, because its implementation uses [code

0 commit comments

Comments
 (0)