April 2014
Intermediate to advanced
182 pages
4h
English
If you remember the initial use case, CCM wants to interact with the authentication service from the Ruby-on-Rails back office application. Therefore, you will implement the client in Ruby. The code you came up with is reproduced as follows:
channel = AMQP::Channel.new(connection) channel.on_error do |ch, channel_close| connection.close { EventMachine.stop } raise "Channel error: #{channel_close.inspect()}" end channel.headers( 'internal-services', :durable => true, :auto_delete => false, :passive => true) do |exchange| channel.queue('', :exclusive => true, :durable => false, :auto_delete => true) do |response_queue| response_queue.subscribe do |metadata, payload| handle_response(metadata.content_type, payload) ...Read now
Unlock full access