# Using msmq (ruby 1.9 and win7)

**URL:** <https://www.ruby-forum.com/t/using-msmq-ruby-1-9-and-win7/191884>\
**Category:** Ruby\
**Created:** [July 20, 2010, 9:29am UTC](https://www.ruby-forum.com/t/using-msmq-ruby-1-9-and-win7/191884 "2010-07-20T09:29:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sigurhel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sigurhel](https://www.ruby-forum.com/u/sigurhel)\
**Post date:** [July 20, 2010, 9:29am UTC](https://www.ruby-forum.com/t/using-msmq-ruby-1-9-and-win7/191884/1 "2010-07-20T09:29:35Z")

</div>

Hi.

Been searching the forums for this and come up well almost blank.

I need to access MSMQ from Ruby, but I am quite new to the ruby/win  
combination.  
Is there a wrapper/client out there similar to the ones for websphere  
mq, apmq etc or how do you people solve this? Interface via COM?

Does anyone have pointers to some howto/lib/client/code to get me  
started here, feeling positively lost.

/S  
OSX forever

---

<div class="post-metadata">

**Author:** ![sigurhel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sigurhel](https://www.ruby-forum.com/u/sigurhel)\
**Post date:** [July 20, 2010, 7:04pm UTC](https://www.ruby-forum.com/t/using-msmq-ruby-1-9-and-win7/191884/2 "2010-07-20T19:04:53Z")

</div>

Sigurdur Helgason wrote:

> Hi.
> 
> Been searching the forums for this and come up well almost blank.
> 
> I need to access MSMQ from Ruby, but I am quite new to the ruby/win  
> combination.  
> Is there a wrapper/client out there similar to the ones for websphere  
> mq, apmq etc or how do you people solve this? Interface via COM?
> 
> Does anyone have pointers to some howto/lib/client/code to get me  
> started here, feeling positively lost.

Maybe ping the IronRuby folk?  
-r

---

<div class="post-metadata">

**Author:** ![sigurhel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sigurhel](https://www.ruby-forum.com/u/sigurhel)\
**Post date:** [July 21, 2010, 2:32am UTC](https://www.ruby-forum.com/t/using-msmq-ruby-1-9-and-win7/191884/3 "2010-07-21T02:32:02Z")

</div>

Sigurdur Helgason wrote:

> Hi.
> 
> Been searching the forums for this and come up well almost blank.
> 
> I need to access MSMQ from Ruby, but I am quite new to the ruby/win  
> combination.  
> Is there a wrapper/client out there similar to the ones for websphere  
> mq, apmq etc or how do you people solve this? Interface via COM?
> 
> Does anyone have pointers to some howto/lib/client/code to get me  
> started here, feeling positively lost.
> 
> /S  
> OSX forever

I have no experience with MSMQ, but it appears that MSMQ components can  
indeed be accessed via COM. A contrived example:

require ‘win32ole’

mq\_info = WIN32OLE.new(‘MSMQ.MSMQQueueInfo’)  
mq\_info.PathName = ‘.\TestQueue’  
mq\_info.Label = ‘Test Queue’  
mq\_info.Create()

Details on Message Queuing COM Components can be found here:

> **[Message Queuing COM Components](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms704064(v=vs.85)?redirectedfrom=MSDN)**

Hope that helps.

David

> **[Ruby on Windows](http://rubyonwindows.blogspot.com)**
>
> On using the Ruby programming language on the Microsoft Windows platform

---

<div class="post-metadata">

**Author:** ![sigurhel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7bcc69/32.png) [@sigurhel](https://www.ruby-forum.com/u/sigurhel)\
**Post date:** [July 21, 2010, 1:25pm UTC](https://www.ruby-forum.com/t/using-msmq-ruby-1-9-and-win7/191884/4 "2010-07-21T13:25:55Z")

</div>

Thanks David and Roger.  
This will indeed get me started.

/S
