Module: Emq::Publisher
- Defined in:
- app/messages/emq/publisher.rb
Overview
This class should be responsible for sending messages to the EMQ which are validated against an Avro schema stored in the RedPanda registry before being sent
Class Method Summary collapse
-
.publish(aliquots, configuration, schema_key) ⇒ Object
Publish a message to the EMQ.
-
.publish_job ⇒ Object
Initialize the publisher with the bunny configuration.
Class Method Details
.publish(aliquots, configuration, schema_key) ⇒ Object
Publish a message to the EMQ
14 15 16 17 18 |
# File 'app/messages/emq/publisher.rb', line 14 def self.publish(aliquots, configuration, schema_key) return if publish_job.nil? publish_job.publish(aliquots, configuration, schema_key) end |
.publish_job ⇒ Object
Initialize the publisher with the bunny configuration
7 8 9 10 11 |
# File 'app/messages/emq/publisher.rb', line 7 def self.publish_job return @publish_job if defined?(@publish_job) @publish_job = Emq::PublishingJob.new if Rails.configuration.bunny['enabled'] end |