Posting of Event to BTS.RFID queue

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

It may happen, that in some advance scenarios is required take more control about queuing mechanism of RFID stack. In this post I would like to show how to post the native message to the private queue of the process pipeline.

First important to know is that all events fired by underlying DSPI are collected by ProcessManager (an internal class) and posted in the private queue. Each process has two related queues. First one is used to collect events and the second one is used to persist suspended events.

Here is one example showing related queues for the process with the name "P3":

hostname\private$\p37a94eecb-c45f-485e-8080-d0a71bce415e

hostname\private$\p37a94eecb-c45f-485e-8080-d0a71bce415esuspended


Following code shows how to post the event in the queue of the transactional process :

 image

By using of this example please be aware of following:

1. The second parameter is the logical device name of the process. If you specify the name of unknown device (which is not bound to the process) the message will be moved to the suspended queue.

2. If the posting message is badly formatted following error will appear in the event log:

The RFID process engine P3 encountered an error of type UnknownFatalError. The service will attempt to restart this process engine automatically, unless this was because of a known fatal error. Additional information: System.InvalidOperationException: Cannot deserialize the message passed as an argument. Cannot recognize the serialization format.
   at System.Messaging.BinaryMessageFormatter.Read(Message message)
   at System.Messaging.Message.get_Body()
   at MS.Internal.Rfid.Service.Process.MSMQMessage.get_Body()
   at MS.Internal.Rfid.Service.Process.TransactionalEventProcessor.GetAndProcessMessage(Nullable`1& eventWithRoute, RfidEventBase& eventToBeProcessed, String& messageId)
   at MS.Internal.Rfid.Service.Process.EventProcessor.ProcessEvent(). If this is due to a known fatal error, resolve the issue, and then start the provider or process manually.

Please note that the code shown in this post is not supported and described deserialization format may change it the future!


Posted May 12 2008, 02:46 PM by Damir Dobric
Filed under:

Comments

Damir Dobric Posts wrote MSMQ Transaction handling
on 05-12-2008 18:09

To understand clearly reliability features of the BizTalk RFID stack I decided to describe shortly transaction

developers.de is a .Net Community Blog powered by daenet GmbH.