Skip to content
Browse files

Merge remote branch 'bernd/rabbitmq18' into bernd_merge

Conflicts:
	lib/nanite/agent.rb
  • Loading branch information...
2 parents 557adee + 747359b commit 1136bca4cbf13439b75f0599be8028ecf4e29ce8 @roidrage roidrage committed Oct 27, 2010
Showing with 7 additions and 7 deletions.
  1. +4 −4 lib/nanite/agent.rb
  2. +1 −1 lib/nanite/cluster.rb
  3. +1 −1 lib/nanite/mapper.rb
  4. +1 −1 lib/nanite/nanite_dispatcher.rb
View
8 lib/nanite/agent.rb
@@ -143,7 +143,7 @@ def disconnect
def un_register
Nanite::Log.info("SEND [un_register]")
- amqp.fanout('registration', :no_declare => options[:secure]).publish(serializer.dump(UnRegister.new(identity)))
+ amqp.fanout('registration', :durable => true, :no_declare => options[:secure]).publish(serializer.dump(UnRegister.new(identity)))
end
def cleanup
@@ -205,7 +205,7 @@ def receive(packet)
Nanite::Log.warn("RECV NOT AUTHORIZED #{packet.to_s}")
if packet.kind_of?(Request)
r = Result.new(packet.token, packet.reply_to, @deny_token, identity)
- amqp.queue(packet.reply_to, :no_declare => options[:secure]).publish(serializer.dump(r))
+ amqp.queue(packet.reply_to, :durable => true, :no_declare => options[:secure]).publish(serializer.dump(r))
end
else
dispatcher.dispatch(packet)
@@ -238,7 +238,7 @@ def setup_queue
def setup_heartbeat
@heartbeat = EM.add_periodic_timer(options[:ping_time]) do
- amqp.fanout('heartbeat', :no_declare => options[:secure]).publish(serializer.dump(Ping.new(identity, status_proc.call)))
+ amqp.fanout('heartbeat', :durable => true, :no_declare => options[:secure]).publish(serializer.dump(Ping.new(identity, status_proc.call)))
end
end
@@ -249,7 +249,7 @@ def setup_mapper_proxy
def advertise_services
reg = Register.new(identity, registry.services, status_proc.call, self.tags)
Nanite::Log.info("SEND #{reg.to_s}")
- amqp.fanout('registration', :no_declare => options[:secure]).publish(serializer.dump(reg))
+ amqp.fanout('registration', :durable => true, :no_declare => options[:secure]).publish(serializer.dump(reg))
end
def parse_uptime(up)
View
2 lib/nanite/cluster.rb
@@ -67,7 +67,7 @@ def publish(request, target)
old_target = request.target
request.target = target unless target == 'mapper-offline'
Nanite::Log.debug("SEND #{request.to_s([:from, :tags, :target])}")
- amq.queue(target).publish(serializer.dump(request, enforce_format?(target)), :persistent => request.persistent)
+ amq.queue(target, :durable => true).publish(serializer.dump(request, enforce_format?(target)), :persistent => request.persistent)
ensure
request.target = old_target
end
View
2 lib/nanite/mapper.rb
@@ -282,7 +282,7 @@ def setup_offline_queue
end
def setup_message_queue
- amq.queue(identity, :exclusive => true).bind(amq.fanout(identity)).subscribe do |msg|
+ amq.queue(identity, :durable => true).bind(amq.fanout(identity)).subscribe do |msg|
begin
msg = serializer.load(msg)
Nanite::Log.debug("RECV #{msg.to_s}")
View
2 lib/nanite/nanite_dispatcher.rb
@@ -34,7 +34,7 @@ def dispatch(deliverable)
if deliverable.kind_of?(Request)
r = Result.new(deliverable.token, deliverable.reply_to, r, identity)
Nanite::Log.debug("SEND #{r.to_s([])}")
- amq.queue(deliverable.reply_to, :no_declare => options[:secure]).publish(serializer.dump(r))
+ amq.queue(deliverable.reply_to, :durable => true, :exclusive => false, :no_declare => options[:secure]).publish(serializer.dump(r))
end
r # For unit tests
end

0 comments on commit 1136bca

Please sign in to comment.
Something went wrong with that request. Please try again.