| Kevin Farley 2006-03-01, 5:51 pm |
| Craig -
Allow me to think out loud here:
1. Your goal is to throttle messages to your vendor to both provide some
type of sequence as well as rate of transaction in order to align with their
ability to process your load.
2. You are currently using an "Accumulator" pattern in an Orchestration and
indeed you will suffer to persist/restore this "long-running process"
I think you may want to apply the following pattern instead:
1. You already have the messages in a Queue. You have no need to Accumulate.
2. It appears that you are single threaded to your vendor so a single
orchestration can run as you have it Correlating on MessageType but not
Accumulating.
3. You can have an Orchestration Activate on a new Message of the Message
Type, and then enter a Loop.
a. The Loop will be to send the message to your vendor and wait for a
response.
b. Next in the Loop you wait a period of time for another message of the
CorrelatedType. If you don't get one in the time frame, then you can end.
c. If you do get one in the time frame you loop.
d. If another message comes in later, a new orchestration is Activated.
4. This way, you have a Sequence and a Throttle, but no Accumulator.
Does this sound right?
Kevin Farley
"Craig Vermeer" wrote:
> Hrm. The SQL solution would definitely work.
>
> What about this? Since the goal of my Orchestration is throttling and
> not real FIFO behavior, what if I correlated the messages on something
> other than MessageType?
>
> Say, for example, I promoted a property to the Message Context that
> consisted of the the current time, rounded to the nearest minute. If I
> correlated on MessageType and this other property, I would get a new
> Orchestration instance every minute. Each Orchestration instance would
> process its batch of messages in a FIFO manner. While this would result
> in a sort of batching functionality rather than the one at a time
> functionality I currently have, I'm sure that this would still be
> acceptable.
>
>
>
>
> Tomas Restrepo (MVP) wrote:
>
|