Sha256: ce77dc4e79ea4674e0480a33563128f9468f72760e133307bf5bace01aab938f

Contents?: true

Size: 300 Bytes

Versions: 10

Compression:

Stored size: 300 Bytes

Contents

# frozen_string_literal: true

<%- module_namespacing do -%>
class <%= "#{name.classify}Producer" %> < Sbmt::KafkaProducer::BaseProducer
  option :topic, default: -> { "<%= topic %>" }

  def publish(payload, **options)
    <%= ("#{producer_type}_publish") %>(payload, options)
  end
end
<%- end -%>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sbmt-kafka_producer-3.2.0 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-3.1.1 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-3.1.0 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-3.0.0 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-2.2.3 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-2.2.2 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-2.2.1 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-2.2.0 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-2.1.0 lib/generators/kafka_producer/producer/templates/producer.rb.erb
sbmt-kafka_producer-2.0.0 lib/generators/kafka_producer/producer/templates/producer.rb.erb