msmq

Including MSMQ as a prerequisite for my application

天涯浪子 提交于 2019-11-28 03:59:56
I'm working on an application that uses MSMQ for interprocess communication, and I need the setup project to be able to install the service if it isn't already. I've checked around for information on making it a prerequisite, but so far I've been unsuccessful at finding this. Any ideas? Discovered the answer on my own...the windows component installer is not crippled by the typical inability to install more than one MSI at any given time, so I'm able to use a custom installer action to execute a command line script to install MSMQ. Here's my Installer class (your options may obviously vary):

Install Msmq using C#

可紊 提交于 2019-11-28 03:49:02
问题 I am creating an installer for an Application that requires MSMQ to be installed, so if MSMQ is not installed, I need to install the msmq. So can MSMQ be installed using C# or any command?? I am using .net 4.0. Thanks in advance 回答1: Here is an answer: Including MSMQ as a prerequisite for my application Also setup script for MSMQ unattended installation 回答2: have a look at the below: http://forums.asp.net/p/1423158/3193402.aspx/1?Re+Installing+MSMQ+Programatically 来源: https://stackoverflow

The number of messages on an MSMQ via Powershell

家住魔仙堡 提交于 2019-11-28 01:03:38
I'd like to provide a queuepath and get the number of messages thereupon. Any advice on how this could be done? RobO This will list all queues on a machine and the number of messages: gwmi -class Win32_PerfRawData_MSMQ_MSMQQueue -computerName $computerName | ft -prop Name, MessagesInQueue Irwin So, I saw this: What can I do with C# and Powershell? and went here: http://jopinblog.wordpress.com/2008/03/12/counting-messages-in-an-msmq-messagequeue-from-c/ And made this # Add the .NET assembly MSMQ to the environment. [Reflection.Assembly]::LoadWithPartialName("System.Messaging") # Create a new

Java and MSMQ

随声附和 提交于 2019-11-27 23:34:07
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

Setting permissions on a MSMQ queue in a script

馋奶兔 提交于 2019-11-27 18:50:50
Can anyone give me some pointers on how to set permissions on MSMQ queues in script, preferably PowerShell, but I'd use VBscript David A present (2015) day answer to this question. Example: New-MsmqQueue -Name "MyQueue" -QueueType Private Get-MsmqQueue -Name "MyQueue" -QueueType Private | Set-MsmqQueueAcl -UserName "Everyone" -Allow FullControl Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2 Reference: https://technet.microsoft.com/en-us/library/dn391735(v=wps.630).aspx And here's some example PowerShell including setting the permissions ... sorry about the length Write

Why does MSMQ think I'm on a workgroup computer?

老子叫甜甜 提交于 2019-11-27 17:23:06
问题 My computer is connected to a domain, but when I go to create a public queue: MessageQueue.Create(@".\testqueue"); I get this error: A workgroup installation computer does not support the operation. Why might MSMQ think I'm on a workgroup computer? 回答1: Being part of a domain is a pre-cursor for installing MSMQ in AD-integrated mode. It doesn't guarantee MSMQ IS installed in AD-integrated mode. MSMQ will install in workgroup mode if: AD integration was not selected as a setup option AD

MSMQ COM API in C#

微笑、不失礼 提交于 2019-11-27 16:15:04
问题 What is the best way to use MSMQManagement from C#? I need the ability to peek and purge a local outgoing queue when the remote machine is disconnected. Apparently some users can do this through the COM API, but in the COM References tab, I don't have the "Microsoft Message Queue 3.0 Object Library" that other websites/blogs/postings mention (nor anything remotely similar). I've searched the machine for Interop.MSMQ.dll and cannot find it either. We are using VS 2008 and running on Windows 7

What is “Outbound Transaction” in layman terms?

坚强是说给别人听的谎言 提交于 2019-11-27 15:54:43
We are going to build WCF services based on SOA. During a meeting recently, client explained the new system environment. He used the word “outbound transaction”. Due to time limitations, I could not get it clarified. Then I made some search in internet. However it leads me to different topics. So, my question is - what is “Outbound Transaction” in the context of “ service orientation ”? Can you give an example? READING: What is SOA "in plain english"? What is a "web service" in plain English? WCF, DataPower integration - secure binding necessary? For the sake of your project, make sure you do

Receiving MSMQ messages with Windows Service

大城市里の小女人 提交于 2019-11-27 14:14:19
问题 I'm creating a Windows Service in C#. What is the best way to listen for messages?? How do I code this properly?? 回答1: You don't listen. You configure MSMQ Activation to activate your component when messages arrive. The link has all the details you need, code and configuration. 回答2: As previously stated, MSMQ Activation is probably the best way, if you can use that. Alternatively, here is code that I've used: var ts = new TimeSpan(0, 0, 10); MessageQueue q = GetQueue<T>(); while (true) { try

How do I prevent a WCF service from enter a faulted state?

空扰寡人 提交于 2019-11-27 10:44:52
I have a WCF Service that should not enter the faulted state. If there's an exception, it should be logged and the service should continue uninterrupted. The service has a one-way operation contract and is reading messages from an MSMQ. My problems are twofold: The service appears to be swallowing an exception/fault so I am unable to debug it. How do I get the service to expose the exception so that I can log or handle it? The service is entering into a faulted state after this exception is swallowed. How do I prevent the service from entering into a faulted state? Most, if not all exceptions