Sha256: 886ba70ba0e7c862bc15e4bb24df122e08766ccd4d1b56383000ce11e0f47312
Contents?: true
Size: 704 Bytes
Versions: 8
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true namespace :rimless do desc 'Start the Apache Kafka consumer' task :consumer do system 'bundle exec karafka server' end desc 'Print all the consumer routes' task routes: :environment do require 'rimless' Rimless.consumer.consumer_groups.each do |consumer_group| consumer_group.topics.each do |topic| name = topic.name.split('.')[1..-1].join('.') puts "# Topic: #{name}" puts "# Consumer: #{topic.consumer}" base = topic.consumer.superclass.new(topic).methods events = topic.consumer.new(topic).methods - base puts "# Events: #{events.join(', ')}" puts end end end end
Version data entries
8 entries across 8 versions & 1 rubygems