3 library(redis_streams): Using Redis streams
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • Redis -- a SWI-Prolog client for redis
        • library(redis_streams): Using Redis streams
          • xstream_set/3
          • xadd/4
          • xlisten/3
          • xlisten_group/5
          • xconsumer_stop/1
          • xhook/2
Availability::- use_module(library(redis_streams)).
Source[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."