Created
November 28, 2008 08:52
-
-
Save kovyrin/29944 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env ruby | |
require 'thrift' | |
$:.push(File.dirname(__FILE__) + "/../src/gen-rb") | |
require 'FastQueue_constants' | |
require 'FastQueue' | |
# Talk to a server via TCP sockets, using a binary protocol | |
transport = Thrift::Socket.new("localhost", 9090) | |
transport.open() | |
protocol = Thrift::BinaryProtocol.new(transport) | |
# Create FastQueue client | |
puts "Connecting to the queue..." | |
queue = FastQueue::Client.new(protocol) | |
# Push some data | |
puts "Pushing some data..." | |
queue.push("test-qeue", "Hello, World!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment