require 'hat/middlewares/json' require 'hat/patterns/topic' module Examples class Topic < Hat::Worker include Hat::Middlewares::Worker::JSON include Hat::Patterns::Topic queue 'hat.topic.worker' listen 'hat.topic.*' def perform(delivery_info, properties, payload) puts payload end end end