<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Stop premature email sending with NServiceBus</title>
	<atom:link href="http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Sat, 25 May 2013 16:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Zedd</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4197</link>
		<dc:creator>Zedd</dc:creator>
		<pubDate>Thu, 08 Dec 2011 04:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4197</guid>
		<description>This works as long as the service bus participates in the transaction. I&#039;m not sure this is always the case. </description>
		<content:encoded><![CDATA[<p>This works as long as the service bus participates in the transaction. I&#8217;m not sure this is always the case. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4146</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 25 Nov 2011 18:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4146</guid>
		<description>I want the sending of an email to succeed if the saving succeeds. Having the message inside the transaction is the only way to really guarantee that this happens. Otherwise, having the message outside the scope is just something else I&#039;ll have to manage in terms of failures and retries. With messaging and NServiceBus, I get that for free.

Transaction scopes are not something I should have to explicitly manage. They should be managed for me in an infrastructure layer.

As far as keeping track of statistics, that&#039;s really orthogonal to the act of sending them. If I don&#039;t want to mix the concerns of sending emails versus keeping statistics on emails sent, I&#039;d just publish an event when the email is actually sent so that another tailor-made component can do whatever it needs to do to record whatever information is needed.</description>
		<content:encoded><![CDATA[<p>I want the sending of an email to succeed if the saving succeeds. Having the message inside the transaction is the only way to really guarantee that this happens. Otherwise, having the message outside the scope is just something else I&#8217;ll have to manage in terms of failures and retries. With messaging and NServiceBus, I get that for free.</p>
<p>Transaction scopes are not something I should have to explicitly manage. They should be managed for me in an infrastructure layer.</p>
<p>As far as keeping track of statistics, that&#8217;s really orthogonal to the act of sending them. If I don&#8217;t want to mix the concerns of sending emails versus keeping statistics on emails sent, I&#8217;d just publish an event when the email is actually sent so that another tailor-made component can do whatever it needs to do to record whatever information is needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4145</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 25 Nov 2011 18:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4145</guid>
		<description>Do you have an example not using SSSB? In terms of simplicity, I&#039;m not sure how SSSB is easier than message queuing. Not to mention, MSMQ can be installed on absolutely any Windows OS, but IT admins are much more restrictive about installing DB components on just any machine.</description>
		<content:encoded><![CDATA[<p>Do you have an example not using SSSB? In terms of simplicity, I&#8217;m not sure how SSSB is easier than message queuing. Not to mention, MSMQ can be installed on absolutely any Windows OS, but IT admins are much more restrictive about installing DB components on just any machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Distributed Weekly 130 &#8212; Scott Banwart&#039;s Blog</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4144</link>
		<dc:creator>Distributed Weekly 130 &#8212; Scott Banwart&#039;s Blog</dc:creator>
		<pubDate>Fri, 25 Nov 2011 14:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4144</guid>
		<description>[...] Stop premature email sending with NServiceBus [...]</description>
		<content:encoded><![CDATA[<p>[...] Stop premature email sending with NServiceBus [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ToOsIK</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4143</link>
		<dc:creator>ToOsIK</dc:creator>
		<pubDate>Fri, 25 Nov 2011 13:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4143</guid>
		<description>Hmm, I like your concept, and I understand your approach, but that sounds like a very round-about way to get solution for a very simple problem.

Why cant you just send the email when you have finished committing the transaction? (the one that wraps your method above)

I mean it sounds like the email is relevant to the full transaction, not this method, why is this method sending the email? it just looks like the code is not structured properly!

Very good article tho, clear and informative, just not for this specific scenario you indicated.

Also, I would use a database table to maintain that, only because I would be able to slice and dice through the data, and infer interesting patterns based on aggregations, like: 

&gt;when most emails are sent
&gt;which email profiles are most used
&gt;what time of the day we have the most load, etc.</description>
		<content:encoded><![CDATA[<p>Hmm, I like your concept, and I understand your approach, but that sounds like a very round-about way to get solution for a very simple problem.</p>
<p>Why cant you just send the email when you have finished committing the transaction? (the one that wraps your method above)</p>
<p>I mean it sounds like the email is relevant to the full transaction, not this method, why is this method sending the email? it just looks like the code is not structured properly!</p>
<p>Very good article tho, clear and informative, just not for this specific scenario you indicated.</p>
<p>Also, I would use a database table to maintain that, only because I would be able to slice and dice through the data, and infer interesting patterns based on aggregations, like: </p>
<p>&gt;when most emails are sent<br />
&gt;which email profiles are most used<br />
&gt;what time of the day we have the most load, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finoutlook</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4141</link>
		<dc:creator>Finoutlook</dc:creator>
		<pubDate>Fri, 25 Nov 2011 11:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4141</guid>
		<description>For example you could use Service Broker in SQLServer http://msdn.microsoft.com/en-us/library/ms345108(v=sql.90).aspx</description>
		<content:encoded><![CDATA[<p>For example you could use Service Broker in SQLServer http://msdn.microsoft.com/en-us/library/ms345108(v=sql.90).aspx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4139</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 24 Nov 2011 19:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4139</guid>
		<description>How would you set it up? Usually I see folks doing cron jobs. The messaging system works via events, so it&#039;s not like the process is constantly waking up.

I only say this cause a system I worked on was moved from a bunch of cron jobs to messaging, and we saw CPU drop quite a bit. But if there are other ways besides cron jobs, I&#039;d love to hear about them.</description>
		<content:encoded><![CDATA[<p>How would you set it up? Usually I see folks doing cron jobs. The messaging system works via events, so it&#8217;s not like the process is constantly waking up.</p>
<p>I only say this cause a system I worked on was moved from a bunch of cron jobs to messaging, and we saw CPU drop quite a bit. But if there are other ways besides cron jobs, I&#8217;d love to hear about them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finoutlook</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4138</link>
		<dc:creator>Finoutlook</dc:creator>
		<pubDate>Thu, 24 Nov 2011 17:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4138</guid>
		<description>No more than the messaging system is waking up constantly to ping a message queue. You don&#039;t have to set up your DB to work that way.</description>
		<content:encoded><![CDATA[<p>No more than the messaging system is waking up constantly to ping a message queue. You don&#8217;t have to set up your DB to work that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Kearon</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4137</link>
		<dc:creator>Sean Kearon</dc:creator>
		<pubDate>Thu, 24 Nov 2011 11:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4137</guid>
		<description>Quite! AFAIK you&#039;d have to code the handling between the commit and send yourself.  

&quot;NServiceBus is overkill for the case.&quot; - Assuming you have MSMQ available an NSB email endpoint is a relatively  simple option.   NSB&#039;s deployment story so sweet, it&#039;s a breeze!</description>
		<content:encoded><![CDATA[<p>Quite! AFAIK you&#8217;d have to code the handling between the commit and send yourself.  </p>
<p>&#8220;NServiceBus is overkill for the case.&#8221; &#8211; Assuming you have MSMQ available an NSB email endpoint is a relatively  simple option.   NSB&#8217;s deployment story so sweet, it&#8217;s a breeze!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4136</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 23 Nov 2011 20:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2011/11/22/stop-premature-email-sending-with-nservicebus/#comment-4136</guid>
		<description>How would it be decoupled? Having another process check periodically on the success of things and send out emails?

You can build a queue using a database and scheduled cron jobs, but why? An ESB is easier and you don&#039;t have some process waking up constantly to ping a database.</description>
		<content:encoded><![CDATA[<p>How would it be decoupled? Having another process check periodically on the success of things and send out emails?</p>
<p>You can build a queue using a database and scheduled cron jobs, but why? An ESB is easier and you don&#8217;t have some process waking up constantly to ping a database.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
