I have an orchestration that is started by a public port published as service. Everytime somebody calls this service the orchestration starts
I need to start the orchestration every 30 minutes too.
Whats is the better approach?
I've seen some here but I would like something more simple
As the blog post you referenced states, BizTalk doesn't really do scheduling. Besides the approaches referenced in that post, I don't think there is really an easier approach to this problem. You mention your orchestration is published as a service. Could you create a simple command line application that calls your service and run that via Windows Schedule or SQLAgent?
There is a reason it does not do things every X minutes. It would be a wrong usage of BizTalk. BizTalk is publish and subscribe. The repetitive process is for WIndows Services and if they need processing then, send to BizTalk from Windows Server.
When you do not publish, you do not receive.
This behaviour can be achieved, however, by an orchestration subscribing to an inbound port (file for example) and then drop a file back at the end.
Write a batch file with reference to windows sheduler
Related
I set up the Masstransit sample apps, and all was great. Local operation, msmq, looks good.
Now I am starting to put masstransit in my real app. In my real app, I have jobs coming from four servers, and processing happening on two worker systems.
It seems that masstransit always wants to push to:
msmq://localhost/...
But I thought I would set up a single, central, msmq server: msmq:///...
It appears (I may be missing something! Please correct me if I am off!) that when using msmq, that I need to set up msmq on multiple machines, and configure msmq to route from machine to machine.
Am I missing something?
Should I skip msmq and jump to rabbitmq right off, (which appears to solve for this)?
Is there some fundamental msmq knowledge (that is perhaps not in the masstransit docs) ?
thank you!
First off I always suggest people use RabbitMQ over MSMQ unless you MUST use DTC for some reason. And even then, I'd suggest you rethink using DTC.
But given you have some constraint you can't fight. You're welcomed to use a central MSMQ server but it doesn't provide a ton of value. Each server sending messages must have MSMQ installed locally because of how it works. Messages actually end up in an outgoing queue before they are sent over the other machine in question. If you have multi-machine MSMQ setups, in the past for me it's been like:
Core Machine runs MassTransit.RuntimeServices at /mt_subscriptions, and maybe one service at /service_1
Other processing machine runs a specific heavy load service at /service_2 and it's configuration references msmq://coremachine/mt_subscriptions for the subscription service.
Yet another processing machine with similar setup
So with those 3 machines, the only thing you don't have msmq://localhost/ is the reference to the subscription service in configuration.
I need to create a Windows Service to watch a folder on our network and action files that are placed within it. The process is quite slow and I need the ability to check the progress from a client application (which will be running in about 10 places on the same network as the machine running the Windows service).
Is hosting some WCF service in the windows service the right way to go about this and if so, are there any resources on how I would do this?
Thanks!
it seems a reasonable approach to me.
you can get details of how to host a WCF service inside a windows service in the MSDN how to
This code project page also has an example.
you might need to debug start up issues with the service, and I find adding a
Debugger.Launch();
to the beginning of the OnStart method is the easiest way of doing that. it enables you to debug through the start up process of your service and see any exceptions that occur.
I have my workflow hosted in a WorkflowServiceApplication running on IIS5 (production environment will be IIS6) with a persistence database. It's a request/approval service so there's a delay (a few days) whilst waiting for approval and if that delay passes with no approval the workflow sends an e-mail to the approver. I've noticed that the pending workflows only "wake up" and send their e-mails if I kick off a new request (i.e. new workflow instance). I assume that in starting a new flow something checks the instance store for instances that are due to resume and resumes them. I've only just noticed the problem because I was previously testing with delays that were just a few minutes rather than days. I haven't tried it on IIS6 yet but I expect it would be the same.
q1) do I need to write a console app or something to periodically check and resume the flows and if so can someone advise how to do it? Or have I just done something wrong?
q2) Assuming that the answer to Q1 is "yes, you need to write something" if I was to use IIS7 and AppFabric (which may be possible) would the sleep/resume just work without me having to write any code to check and resume the flows? i.e. just deploy the workflow service into AppFabric and it works?
Thanks in advance.
The answer to q1 is yes. After an IIS AppDomain recycles it is not restarted until there is an external request for it. As a result the WorkflowServiceHost is not active and expired Delay activities will not be resumed. With versions of IIS before 7 you need to create an external request to make sure the WorkflowServiceHost is available. The easiest way of doing so is just have a windows service periodically retrieve the WSDL page.
If your upgrade to IIS7 and AppFabric you can configure a service to automatically start as soon as IIS is running and that will take care of the same problem. I would prefer this option as AppFabric gives you a lot of extra benefits like tracking.
Yes Windows Server AppFabric's Workflow Management Service will wake up workflows with pending timers. You get this for free as well as other goodies.
I have WCF service hosted in console app. Service tries to connect to opened windows application via DDE protocol. No luck. Where is the problem? Console app is running in my account, as the dde windows app.
I'm not expert in this field, but I believe DDE requires that you have a running message pump (which a console application lacks), so you may have better luck hosting your WCF service in a WinForms app.
You have provided so little details about the problem that is going to be nearly impossible to give you a definitive answer. However, your comment to Allon's answer is interesting.
If i run listener in console without
WCF, all is fine
So your DDE application is listening for something? I now have to assume that you have attempted to create a DDE client that subscribes to an advisory loop via DdeClient.StartAdvise. This method of data retrieval is highly dependent on a message pumping mechanism.
When you create an instance of DdeClient it will by default create its own message pump on a separate thread to receive these advisory notifications. That would explain why it works when you leave your code in a basic console application.
However, when you mix WCF there may be some adding complexities particularly concerning threads that may have to be dealt with manually. The only way I am going to be able to tell is if you provide more information.
Is it possible to use NServiceBus to publish and consume messages in the same application, specifically a web application?
In the future we will almost certainly need to maintain a separate long running service to process messages generated by this application, and this is why we are hoping to use NServiceBus from the start, but right now it would be nice to just start up the consumer and the publisher when the web application starts. This will make testing and deployment far easier for us.
I presume I will need to reference the NServiceBus.Host.exe and start up the process in the global.asax, but need help on what exactly I need to call to do this.
This is not a mode of deployment that is supported out of the box. While you could make this work by manually creating an additional appdomain for the second NServiceBus endpoint, you'd also likely need to give it a custom configuration source, and of course its own queue.
All in all, I'd recommend keeping it as a separate process, even if it is on the same box. That being said, you can create a second web app to host it rather than using the generic host if you don't want to manage windows services in addition to web apps.
Hope that helps.