Sha256: f748989ee4be19b782516f74bb0e30620da9d8932f073b70d6a08a8e6c4a1b7c
Contents?: true
Size: 1.13 KB
Versions: 36
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true module RubyRabbitmqJanus module Rabbit module Publisher # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv> # This publisher send and read an message in admin queues class PublisherAdmin < Publisher # Intialize an queue non eclusive for admin/monitor API with Janus # # @param [String] exchange Exchange used for the transaction def initialize(exchange) @reply = exchange.queue(Tools::Config.instance.queue_admin_from) super(exchange) subscribe_to_queue rescue raise Errors::Rabbit::PublisherAdmin::Initialize end # Send an message to queue and waiting a response # # @param [String] request JSON request sending to rabbitmq queue # # @return [Janus::Response::Standard] response for an request reading # by janus instance def publish(request) super(request) return_response rescue raise Errors::Rabbit::PublisherAdmin::Pusblish end private attr_reader :reply end end end end
Version data entries
36 entries across 36 versions & 1 rubygems