jandelgado/rabtap

Feature Request: Terminate after all messages are consumed from queue

manuel-koch opened this issue · 6 comments

I like to use rabtap to consume all messages from a DeadLetter/ParkinLot queue to inspect them and later maybe re-publish them.

Currently rabtap seem to continue to consume message from given queue without ever terminating ( unless I hit Ctrl-C ).

Would be nice if rabtap would terminate ( after a given timeout ) when no more messages where consumed from given queue.

Since rabtap can not know when the "last" message arrived, an optional timeout would be the only solution here. I'll put it in the backlog.

@jandelgado I need some kind of this feature too. I will use your tool for e2e testing of my project so it would be very nice to have a flag some kind of rabtap sub <queue> --consume n - in order to consume exact n messages, then disconnect and exit 0 The problem is I too inexperienced with Go to make PR :)

OMG you already have it! #54 Please :))

The PR is not yet finished, will work on it the next days

Thank you so much @jandelgado <3

@manuel-koch: release 1.35 adds a new --idle-timeout=DURATION option to the sub and tap commands, which allows to terminate after a given period of inactivity