Changed twist publisher to use duration istead of number of messages.