wcf - How do I set the Priority on client side of MSMQ message sent to a WF Service activated via MQ -


i have wcf activated workflow service (xamlx) setup (hosted using workflowservicehost).

this wcf webservice has 'netmsmqbinding' binding , net.msmq based endpoint used clients schedule operations.

on client side, i've used visual studio generate proxy stub communicate wcf service. working fine , can see messages appearing in (journaled) mq on server , wcf picking messages queue activate configured workflow based on message.

i need control priority of messages being sent mq wcf clients can prioritized processing of workflows.

it seems netmsmqbinding doesn't support mq message prioritization. correct? if so, how can achieve/simulate this? can use mq triggers change priority of messages based on flags?

posting solution, in case needs figure out

netmsmqbinding not support setting message priority client side using wrong binding. more powerful msmqintegrationbinding right way go.

client side: client side, 1 needs create system.messaging.message object, set priority , drop in messagequeue.messagequeue object points destination mq.

server side: workflowservice hosting wcf project needs following endpointbinding in web.config:


<endpoint address="msmq.formatname:direct=os:.\private$\mywebservice/myprocessingservice.xamlx" binding="msmqintegrationbinding" bindingconfiguration="mymsmqintegrationbinding" contract="imyprocessingservice" name="mqintegrationbindingendpoint" />

(the address assuming mq service local wcf hosted)

<bindings> <!--we use msmqintegrationbinding instead of netmsmqbinding since want control priority of mq messages being dropped in queue , not supported in netmsmq --> <msmqintegrationbinding> <binding name="mymsmqintegrationbinding" exactlyonce="false"> <security mode="none" /> </binding> </msmqintegrationbinding>


the way receive msmqmessage mq , process dropping "receive" activity in xamlx , choosing message content definition messagetype system.servicemodel.msmqintegrationmessage<yourtypegoeshere> you'll have access msmqmessage<yourtype> activitycontext can retrieve value sent in message.

this useful , powerful way build scalable, throttled priority control mq+wcf+wf based web service


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -