Skip to content

Instantly share code, notes, and snippets.

@quidproquo
Created August 11, 2012 01:13
Show Gist options
  • Save quidproquo/3319717 to your computer and use it in GitHub Desktop.
Save quidproquo/3319717 to your computer and use it in GitHub Desktop.
TorqueBox JMSXGroupID Test
#!/usr/bin/env jruby
require 'rubygems'
require 'torquebox-messaging'
queue = TorqueBox::Messaging::Queue.new(
'/queues/trade/prod_ord',
host: 'localhost',
port: 5445
)
2.times.each do |index|
10.times.each do |count|
queue.publish "Message index: #{index} group: #{count}",
properties: { 'JMSXGroupID' => "Group-#{count}", '_HQ_GROUP_ID' => "Group-#{count}" }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment