This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20:20:43 ~$ irb | |
irb(main):001:0> load "boom.rb" | |
=> true | |
irb(main):002:0> load "boom.rb" | |
Traceback (most recent call last): | |
4: from /usr/local/bin/irb:11:in `<main>' | |
3: from (irb):2 | |
2: from (irb):2:in `load' | |
1: from boom.rb:1:in `<top (required)>' | |
TypeError (superclass mismatch for class Country) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Country < Struct.new(:request, :ip, :country_code, :country_code2, :country_code3, :country_name, :continent_code) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Country < Struct.new(:request, :ip, :country_code, :country_code2, :country_code3, :country_name, :continent_code) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting polling from Java bids consumer: | |
key: 4, payload: {"bid_amount":4,"producer_id":"producer_1"} | |
key: 9, payload: {"bid_amount":9,"producer_id":"producer_2"} | |
key: 6, payload: {"bid_amount":12,"producer_id":"producer_1"} | |
key: 9, payload: {"bid_amount":18,"producer_id":"producer_2"} | |
key: 5, payload: {"bid_amount":15,"producer_id":"producer_2"} | |
key: 8, payload: {"bid_amount":24,"producer_id":"producer_1"} | |
key: 2, payload: {"bid_amount":8,"producer_id":"producer_1"} | |
key: 6, payload: {"bid_amount":24,"producer_id":"producer_2"} | |
key: 2, payload: {"bid_amount":10,"producer_id":"producer_1"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19:54:19 kafka_rb$ be ruby producer.rb | |
producer_2: Starting to publish messages... | |
producer_2: Publishing message with key=9 message={"bid_amount":9,"producer_id":"producer_2"} | |
producer_1: Starting to publish messages... | |
producer_1: Publishing message with key=4 message={"bid_amount":4,"producer_id":"producer_1"} | |
producer_1: Publishing message with key=6 message={"bid_amount":12,"producer_id":"producer_1"} | |
producer_2: Publishing message with key=9 message={"bid_amount":18,"producer_id":"producer_2"} | |
producer_2: Publishing message with key=5 message={"bid_amount":15,"producer_id":"producer_2"} | |
producer_1: Publishing message with key=8 message={"bid_amount":24,"producer_id":"producer_1"} | |
producer_1: Publishing message with key=2 message={"bid_amount":8,"producer_id":"producer_1"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
KafkaConsumer consumer = new KafkaConsumer(getProperties()); | |
consumer.subscribe(Collections.singletonList("bids")); | |
System.out.println("Starting polling from Java bids consumer:"); | |
while(true) { | |
ConsumerRecords<String, String> records = consumer.poll(100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "kafka" | |
require "json" | |
class Producer | |
def initialize(producer_id) | |
@producer_id = producer_id | |
@kafka = Kafka.new(["localhost:9092"], client_id: @producer_id) | |
@count = 0 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
KafkaConsumer consumer = new KafkaConsumer(getProperties()); | |
consumer.subscribe(Collections.singletonList("bids")); | |
System.out.println("Starting polling from Java bids consumer:"); | |
while(true) { | |
ConsumerRecords<String, String> records = consumer.poll(100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "rails", "3.2.19" | |
require "rails" | |
require "action_controller/railtie" | |
class TestApp < Rails::Application | |
config.root = File.dirname(__FILE__) | |
config.session_store :cookie_store, key: "cookie_store_key" | |
config.secret_token = "1111111111111111111111111111111111111111111111111111111111111111111111111secret_token" | |
config.secret_key_base = "secret_key_base" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate the gem you are reporting the issue against. | |
gem 'rails', '4.0.0' | |
require 'rails' | |
require 'action_controller/railtie' | |
class TestApp < Rails::Application | |
config.root = File.dirname(__FILE__) | |
config.session_store :cookie_store, key: 'cookie_store_key' | |
config.secret_token = 'secret_token' |
NewerOlder