module FeatureChannel::Publisher

Public Class Methods

send_message(feature:, id:, type:, payload: nil) click to toggle source
# File lib/feature_channel/publisher.rb, line 8
def send_message(feature:, id:, type:, payload: nil)
  FeatureChannel.delivery_strategy.publish(
    FeatureChannel.topic,
    MessagePack.pack(
      service: FeatureChannel.service_name,
      feature: feature,
      id: id.to_s,
      type: type,
      payload: payload
    )
  )
end