Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java and MSMQ

Tags:

java

interop

msmq

I was curious if anyone had any suggestions on a Java library that provides access to MSMQ? I've downloaded the trial of the J-Integra Java-COM library and have built and run their MSMQ example app, but I was curious if there were any good (free :)) alternatives. I've run across a few JNI implementations like jMSMQ and a few others, but I'd rather avoid JNI if possible.

We've also investigated some .NET<->JMS interop solutions like JNBridge (with ActiveMQ). I think our company has decided to centralize our queueing in MSMQ however, so that would be our ideal solution.

We are hoping to use WCF (netMsmq or msmqIntegration) on the .NET side. I'm a little concerned about how the java side will deal with the WCF messages (binary encoding), but there should be options there (customBinding with text encoding and MSMQ transport?), so I'm not too worried about that. Mostly worried about getting access to MSMQ in Java.

Our other option is to just put a thin web-service layer at the input end of each queue, and achieve interop that way. Performance is a little bit of a concern there, however.

Any suggestions? Thanks a lot for anyone's time.

like image 329
Andy White Avatar asked Feb 03 '09 04:02

Andy White


People also ask

Is MSMQ dead?

Microsoft Message Queuing, better known by its nickname MSMQ, passed away peacefully in its hometown of Redmond, Washington on October 14, 2019, at the age of 22. It was born in May 1997 and through 6.3 versions lived a very full life, bringing the promise of reliable messaging patterns to users all around the globe.

What is MSMQ used for?

Message Queuing (MSMQ) technology enables applications running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues.

What is MSMQ in Active Directory?

The Microsoft Message Queuing (MSMQ) protocol set optionally supports a Directory Service to enable a set of features pertaining to message security, efficient routing, and the publishing of queues, distribution lists, and queue aliases.


2 Answers

As far as I understand J-Integra is the only pure Java implementation of MSMQ, ie this is the only alternative if you are not running on Windows. (Please let me know if there are other alternatives!)

Apache Camel and other uses JNI to access the Windows API (DLL files) which obviously means that is only works on Windows.

I am currently trying out the code provided here http://www.codeplex.com/MsmqJava which seems simple to use, but I'm not really sure how transactions work.

like image 175
Jan Kronquist Avatar answered Oct 22 '22 14:10

Jan Kronquist


There is an open-source library on CodePlex: MsmqJava. Free.

like image 32
Cheeso Avatar answered Oct 22 '22 12:10

Cheeso