 [multifile]xhook(+Stream, 
+Event)This multifile predicate is called on certain stream events. Defined 
events are:
[multifile]xhook(+Stream, 
+Event)This multifile predicate is called on certain stream events. Defined 
events are:
- delivery_failed(Id, Group, Delivered)
- A message was delivered more than specified by max_deliveries/1 
of xlisten_group/5. Id 
is the message id, Group the group and
Delivered the current delivery count. If the hooks fails, the 
message is acknowledged using XACK. From introduction 
to streams:
 "So once the deliveries counter reaches a given large 
number that you chose, it is probably wiser to put such messages in 
another stream and send a notification to the system administrator. This 
is basically the way that Redis streams implement the concept of the 
dead letter."