diff options
Diffstat (limited to 'pkg/priority_queue')
-rw-r--r-- | pkg/priority_queue/binary_heap_test.go | 4 | ||||
-rw-r--r-- | pkg/priority_queue/interface.go | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/priority_queue/binary_heap_test.go b/pkg/priority_queue/binary_heap_test.go index 663741ad..21167051 100644 --- a/pkg/priority_queue/binary_heap_test.go +++ b/pkg/priority_queue/binary_heap_test.go @@ -20,6 +20,10 @@ func (t Test) Nack() error { return nil } +func (t Test) Requeue(_ uint32) error { + return nil +} + func (t Test) Body() []byte { return nil } diff --git a/pkg/priority_queue/interface.go b/pkg/priority_queue/interface.go index d64aaf3d..eee2a090 100644 --- a/pkg/priority_queue/interface.go +++ b/pkg/priority_queue/interface.go @@ -25,4 +25,7 @@ type Item interface { // Nack - discard the Item Nack() error + + // Requeue - put the message back to the queue with the optional delay + Requeue(delay uint32) error } |