v2.0-non-rails/app/consumers/pong/ping_consumer.rb
# We increase the ball hits and respond
We increase the ball hits and respond
We increase the ball hits and respond
def consume
      hits = messages.last.payload['hits'] + 1
      Karafka.logger.info "Ping consumer with hits: #{hits}"
      producer.produce_async(topic: 'pong', payload: { hits: hits }.to_json)
    end
def consume hits = messages . last . payload [ 'hits' ] + 1 Karafka . logger . info "Ping consumer with hits: #{hits}" producer . produce_async ( topic : 'pong' , payload : { hits : hits } . to_json ) end
We increase the ball hits and respond
We increase the ball hits and respond
# The initial ping needs to be triggered via the rake task