Home > Book > NServiceBus Books

NServiceBus Books

I am really excited to be part of 2 excellent NServiceBus book reviews and finally both the books have been published.Open source and Enterprise Service Bus (ESB) development has been my biggest passion and big thanks to Packt Publishing to allow me to review these books.

Learning NService Bus Second Edition

The second edition of the book includes the following improvements over the first edition:

  • Completely updated to cover NServiceBus 5.0
  • All-new chapter on the Service Platform (ServiceControl, ServiceInsight, ServicePulse, and ServiceMatrix)
  • More diagrams (these were unfortunately sparse in the first edition)
  • Coverage of V5-specific features (Pipeline, Outbox)
  • Revised and expanded‚Ķeverything

The author of the book David Boike has got a full post on his blog at Learning NService Bus

The second book is about NServiceBus Sagas and here are the details of the book.


Learning NService Bus Sagas

The key feature of this book are:-

  • Explore the robust features of NServiceBus to build different endpoints and messaging queues
  • Design, develop, and test sagas to handle messages and persist message objects
  • Get to grips with the NSB platform tools through this step-by-step learning experience
Advertisements
  1. Lokesh Arora
    June 26, 2015 at 12:19 pm

    Hi Prashant,
    I am currently porting my solution (which is using the service bus) from Azure SDK 1.8 to SDK 2.5, Earlier i was using the Transient Application Handling block for the retry policy Mechanism (using the Enterprise Library 5.0), and now it is retired and 6.0 version is there, but i read somewhere that “For handling the Transient errors in service bus, native Retry policy of the Service Bus should be used”. But i am not able to understand the native Retry policy mechanism, so can you just help me out?
    Here is the previous Written code using the Enterprise Library 5.0:-

    internal class RetryPolicyManager
    {
    //public static ExponentialRetry BuildRetryPolicy()
    //{
    // var retryPolicy = new ExponentialRetry(TimeSpan.Zero, 20);
    // return retryPolicy;
    //}
    public static RetryPolicy BuildRetryPolicy()
    {
    var retryPolicy = new RetryPolicy(3);

    return retryPolicy;
    }
    }

    using System;
    using Microsoft.ServiceBus.Messaging;
    using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;

    namespace Charm.ServiceBus.Implementation.FaultTolerant
    {
    internal class BrokeredMessageMethods
    {
    private BrokeredMessage _brokeredMessage;

    private BrokeredMessageMethods(BrokeredMessage brokeredMessage)
    {
    _brokeredMessage = brokeredMessage;
    }

    public static void Complete(BrokeredMessage brokeredMessage)
    {
    var retrypolicy = RetryPolicyManager.BuildRetryPolicy();

    var methods = new BrokeredMessageMethods(brokeredMessage);

    retrypolicy.ExecuteAction(methods.BeginComplete, methods.EndComplete, methods.OnCompleteSuccess, methods.OnCompleteException);
    }

    public static void Abandon(BrokeredMessage brokeredMessage)
    {
    var retrypolicy = RetryPolicyManager.BuildRetryPolicy();

    var methods = new BrokeredMessageMethods(brokeredMessage);

    retrypolicy.ExecuteAction(methods.BeginAbandon, methods.EndAbandon, methods.OnAbandonSuccess, methods.OnAbandonException);
    }

    private void BeginComplete(AsyncCallback callback)
    {
    try
    {
    _brokeredMessage.BeginComplete(callback, null);
    }
    catch (ObjectDisposedException)
    { }
    catch (Exception)
    {
    throw;
    }
    finally
    {

    }
    }

    private void EndComplete(IAsyncResult result)
    {
    try
    {
    _brokeredMessage.EndComplete(result);
    }
    catch (TimeoutException)
    {
    }
    catch (MessagingEntityNotFoundException)
    {

    }
    catch (MessageLockLostException ex)
    {
    string es = ex.Message;
    }
    catch (Exception)
    {
    throw;
    }
    finally
    {
    }
    }

    private void OnCompleteSuccess()
    {
    try
    {

    }
    finally
    {
    if (_brokeredMessage != null)
    {
    _brokeredMessage.Dispose();
    _brokeredMessage = null;
    }
    }
    }

    private void OnCompleteException(Exception exception)
    {
    try
    {

    }
    finally
    {
    if (_brokeredMessage != null)
    {
    _brokeredMessage.Dispose();
    _brokeredMessage = null;
    }
    }
    }

    private void BeginAbandon(AsyncCallback callback)
    {
    try
    {
    _brokeredMessage.BeginAbandon(callback, null);
    }
    catch (MessagingEntityNotFoundException)
    {

    }
    catch (TimeoutException)
    {
    }
    catch (Exception)
    { }

    finally
    {

    }
    }

    private void EndAbandon(IAsyncResult result)
    {
    try
    {
    _brokeredMessage.EndAbandon(result);
    }
    catch(TimeoutException)
    {
    }
    catch (Exception)
    {
    throw;
    }
    finally
    {
    }
    }

    private void OnAbandonSuccess()
    {
    try
    {

    }
    finally
    {
    if (_brokeredMessage != null)
    {
    _brokeredMessage.Dispose();
    _brokeredMessage = null;
    }
    }
    }

    private void OnAbandonException(Exception exception)
    {
    try
    {

    }
    finally
    {
    if (_brokeredMessage != null)
    {
    _brokeredMessage.Dispose();
    _brokeredMessage = null;
    }
    }
    }
    }
    }

    Now i want to replace the code withe native one, so plz help me in the porting…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: