MSMQ触发规则参数格式问题 [英] MSMQ Trigger Rules Parameter Format Issue

查看:93
本文介绍了MSMQ触发规则参数格式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Frns,

Hi Frns,

这是我的问题:

我想访问.Net组件内的队列消息。我不想使用System.Messaging类来接收消息体,而是想通过触发规则的参数传递信息。这里有2个选项"MessageBody(as String)"和"MessageBody(as Variant)"。

I want to access queue message inside a .Net component. I dont want to use System.Messaging Class to receive the message body, instead I want to pass the information through trigger rule's parameters. There is 2 options here "MessageBody (as String)" and "MessageBody (as Variant)".

Variant数据类型,在.Net中被称为Byte数组。因此,触发器调用的方法将具有一个字节数组参数来代替"MessageBody(as Variant)"参数。如果我使用

Variant datatype, is mentioned in .Net as Byte array. So the method called by the trigger will hav a byte array parameter in place of the "MessageBody (as Variant)" parameter. if i am casting using

ASCIIEncoding .ASCII.GetString

ASCIIEncoding.ASCII.GetString

 方法,我能够获取字符串消息。但是,如果我将参数传递给                         当我使用.Net客户端发送邮件时,会发生这种情况。但是,如果我使用VB6.0客户端发送消息,则参数值将完全放入.Net类中(通过将其公开为COM类),除了将空格附加到消息的每个字母上"MessageBody(作为Variant)"参数值。

 method, I am able to get the string message. But if I am passing the paramter as  "MessageBody (as String)",  I receive junk characters as the parameter value inside the method. This happens when I send message using a  .Net client. But If i am sending a message with a VB6.0 Client, the parameter values are pased perfectly into the .Net class(by exposing it as a COM class), except that a space will be appended onto each letter of the message for the "MessageBody (as Variant)" parameter value.

另外,当我们手动检查队列中的消息时(在队列属性中), 从VB6客户端发送的消息格式与从.Net客户端发送的消息格式不同。我应该怎么做才能通过规则 参数统一接收邮件主体,而不依赖于客户端的类型?

Also, When we manually check the message in the queue(in queue properties),  the format of the message send from VB6 client is different from a msg sent from a .Net Client. What should I do to uniformly receive the messagebody through the rule parameter,  independent of the type of client?.

请帮助我..

 

谢谢,

推荐答案

我遇到同样的问题。有点失望了。我找不到解决方案。我在EXE中将消息正文作为字符串传递,但是如何在.net程序中获取消息

任何人都有答案,我会很感激
I have the same problem.  A bit dissapointed already.  I cannot find a solution.  I am passing the message body as string in an EXE, but how do I get the message in the .net program

Anybody has  answers,  I'll appreciate


这篇关于MSMQ触发规则参数格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆