require 'hat/publisher' namespace :hat do namespace :examples do task :seed_direct do require 'hat/middlewares/publisher/json' Hat.config.publisher.middlewares << Hat::Middlewares::Publisher::JSON 10000.times { Hat::Publisher.direct('hat.examples.topic', {foo: 'bar'}) } end end end