If looked for an answer in the documentation, but I didn't find anything. If this is already documented, please give me a hint.
How would you cleanly shutdown a consumer? This means, it will not accept any new messages but still continue to process the ones it already received. After the last message was processed successful or fails, the worker could stop (this is not the problem). My problem is, I don't know how to tell MT to stop with receiving messages.
On Tue, Jul 10, 2012 at 10:44 AM, Christoph <langal...@gmail.com> wrote:
> Hi everyone,
> If looked for an answer in the documentation, but I didn't find anything.
> If this is already documented, please give me a hint.
> How would you cleanly shutdown a consumer?
> This means, it will not accept any new messages but still continue to
> process the ones it already received. After the last message was
> processed successful or fails, the worker could stop (this is not the
> problem).
> My problem is, I don't know how to tell MT to stop with receiving
> messages.
> Any hints on this?
> Thanks
> --
> You received this message because you are subscribed to the Google Groups
> "masstransit-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/masstransit-discuss/-/jkuPRgLqjwAJ.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/masstransit-discuss?hl=en-US.
You need to shut down the bus, by calling Dispose() on the IServiceBus
interface. This will stop the threads, allowing any executing consumers to
complete, and cleanly exit.
On Tue, Jul 10, 2012 at 10:44 AM, Christoph <langal...@gmail.com> wrote:
> Hi everyone,
> If looked for an answer in the documentation, but I didn't find anything.
> If this is already documented, please give me a hint.
> How would you cleanly shutdown a consumer?
> This means, it will not accept any new messages but still continue to
> process the ones it already received. After the last message was
> processed successful or fails, the worker could stop (this is not the
> problem).
> My problem is, I don't know how to tell MT to stop with receiving
> messages.
> Any hints on this?
> Thanks
> --
> You received this message because you are subscribed to the Google Groups
> "masstransit-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/masstransit-discuss/-/jkuPRgLqjwAJ.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/masstransit-discuss?hl=en-US.
> You need to shut down the bus, by calling Dispose() on the IServiceBus interface. This will stop the threads, allowing any executing consumers to complete, and cleanly exit.
> On Tue, Jul 10, 2012 at 10:44 AM, Christoph <langal...@gmail.com> wrote:
> Hi everyone,
> If looked for an answer in the documentation, but I didn't find anything. If this is already documented, please give me a hint.
> How would you cleanly shutdown a consumer? > This means, it will not accept any new messages but still continue to process the ones it already received. After the last message was processed successful or fails, the worker could stop (this is not the problem).
> My problem is, I don't know how to tell MT to stop with receiving messages.
> Any hints on this?
> Thanks
> -- > You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/masstransit-discuss/-/jkuPRgLqjwAJ.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en-US.
> -- > You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en-US.
On Tue, Jul 10, 2012 at 1:41 PM, Dru Sellers <d...@drusellers.com> wrote:
> Will Dispose block until they are all done?
> -d
> On Jul 10, 2012, at 12:30, Chris Patterson <ch...@phatboyg.com> wrote:
> You need to shut down the bus, by calling Dispose() on the IServiceBus
> interface. This will stop the threads, allowing any executing consumers to
> complete, and cleanly exit.
> On Tue, Jul 10, 2012 at 10:44 AM, Christoph <langal...@gmail.com> wrote:
>> Hi everyone,
>> If looked for an answer in the documentation, but I didn't find anything.
>> If this is already documented, please give me a hint.
>> How would you cleanly shutdown a consumer?
>> This means, it will not accept any new messages but still continue to
>> process the ones it already received. After the last message was processed
>> successful or fails, the worker could stop (this is not the problem).
>> My problem is, I don't know how to tell MT to stop with receiving
>> messages.
>> Any hints on this?
>> Thanks
>> --
>> You received this message because you are subscribed to the Google Groups
>> "masstransit-discuss" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/masstransit-discuss/-/jkuPRgLqjwAJ.
>> To post to this group, send email to masstransit-discuss@googlegroups.com.
>> To unsubscribe from this group, send email to
>> masstransit-discuss+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/masstransit-discuss?hl=en-US.
> --
> You received this message because you are subscribed to the Google Groups
> "masstransit-discuss" group.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/masstransit-discuss?hl=en-US.
> --
> You received this message because you are subscribed to the Google Groups
> "masstransit-discuss" group.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/masstransit-discuss?hl=en-US.
What will happen if some error occurs and the bus is already shut down? Is the regarding Fault<T> still sent?
I have to stop the processing of new messages during the shutdown phase of a windows service. The service should wait as long as there are messages in processing, but stop to process new ones.
If you are wanting to "drain" the queues before exiting, that's not
something that is available. In a distributed system, this could mean the
service never exists as events and commands continue to be added to the
queues by other services.
On Wed, Jul 11, 2012 at 2:57 AM, Christoph <langal...@gmail.com> wrote:
> What will happen if some error occurs and the bus is already shut down? Is
> the regarding Fault<T> still sent?
> I have to stop the processing of new messages during the shutdown phase of
> a windows service. The service should wait as long as there are messages in
> processing, but stop to process new ones.
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/masstransit-discuss?hl=en-US.
> If you are wanting to "drain" the queues before exiting, that's not > something that is available. In a distributed system, this could mean the > service never exists as events and commands continue to be added to the > queues by other services.
That is true and not the required behavior. I mean the consumer should finish the processing of the messages it already _has_ received. It should not receive _new_ ones. I now know that for this I have to dispose the bus.
But in the case that some of the consumers receive an error during processing and the bus is disposed, I assume the Fault<T> message couldn't be sent anymore. Is this correct?
> But in the case that some of the consumers receive an error during
> processing and the bus is disposed, I assume the Fault<T> message couldn't
> be sent anymore. Is this correct?
The bus is not completely disposed until the consumer finishes
processing. This should still succeed as desired.
Faults will be sent just fine, the consumers already handling messages will
complete and the bus is not actually disposed until all of the consumers
are completed.
On Wed, Jul 11, 2012 at 7:15 AM, Christoph <langal...@gmail.com> wrote:
> If you are wanting to "drain" the queues before exiting, that's not
>> something that is available. In a distributed system, this could mean the
>> service never exists as events and commands continue to be added to the
>> queues by other services.
> That is true and not the required behavior. I mean the consumer should
> finish the processing of the messages it already _has_ received. It should
> not receive _new_ ones.
> I now know that for this I have to dispose the bus.
> But in the case that some of the consumers receive an error during
> processing and the bus is disposed, I assume the Fault<T> message couldn't
> be sent anymore. Is this correct?
> To post to this group, send email to masstransit-discuss@googlegroups.com.
> To unsubscribe from this group, send email to
> masstransit-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/masstransit-discuss?hl=en-US.