How to send a message to a transactional queue in msmq

ntnt Member Posts: 160
hi,

anyone knows How to send a message to a transactional queue in msmq?

how i create a transaction in c/al code?

thanks

Comments

  • DenSterDenSter Member Posts: 8,307
    Not possible as far as I know. I have worked for days on end to make this work, but the messages just disappear. When Navision created the MQ Bus Adapter, they decided that they only needed non-transactional message queues.

    The closest you can get is to write a .NET component as a trigger in your non-transactional queue that forwards the messages into a transactional queue. One of my customers made that work the other way, from Biztalk into transactional queue, forwarded into a non-transactional queue, so Navision could pick up the message.
  • ntnt Member Posts: 160
    thanks for your post.
    you can send me that component?
  • DenSterDenSter Member Posts: 8,307
    Unfortunately the component was proprietary and confidential. I did see the C# code and if I remember correctly it was something like a single class module with one public void called ProcessMessage with a label, a path to the queue and a message object as parameters.

    The function translates the incoming object (I believe Biztalk 2004 sends it as a byte array) into an MSDOM object, creates a Queue object with the path name, creates a new message object using the label and the MSDOM, and sends it into the queue. In .NET you can set the queue object to be either transactional or not, so that should not be any problem.

    The trick is to compile the function as a COM dll, and I am not sure exactly how to do that (using some namespace and assigning a giud to the module, something like that), but google will know for sure. This dll gets assigned to a transactional message queue trigger using “rules” and will execute each time an entry is added to the queue.

    This will only partly take you there, but you should be able to find out the rest with google's help. Also, check out the public Microsoft newsgroups, there are very good .NET groups out there with tons of people itching to give you the goodies.
  • ntnt Member Posts: 160
    ok thanks.
    ;)
Sign In or Register to comment.