Class: Artery::HealthzSubscription

Inherits:
Object
  • Object
show all
Defined in:
lib/artery/healthz_subscription.rb

Instance Method Summary collapse

Instance Method Details

#subscribeObject



5
6
7
8
9
10
11
12
# File 'lib/artery/healthz_subscription.rb', line 5

def subscribe
  healthz_route = "#{Artery.service_name}.healthz.check"
  Artery.logger.debug "Subscribing on '#{healthz_route}'"

  Artery.subscribe healthz_route, queue: "#{Artery.service_name}.healthz.check" do |_data, reply, _from|
    Artery.publish reply, status: :ok
  end
end