I am using the awesome Jesque package to process jobs from Resque.

We have a mixture of Ruby and Java workers. All our workers accept a Hash of arguments. In one case I needed to create a job from Java to be consumed by a Ruby worker. To generate the appropriate argument structure I ended up making a dummy worker class like:

and I materialize the Job like so:

Using this technique I can properly generate jobs from Java to be consumed by Ruby workers.