Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Upgrade Version 1 to 2

Component: Callbacks

Enable callbacks

Callbacks have been made opt-in. In order to make callbacks work they have to be enabled explicitly.

var instanceDiscriminator = ConfigurationManager.AppSettings["InstanceId"];
endpointConfiguration.MakeInstanceUniquelyAddressable(instanceDiscriminator);
endpointConfiguration.EnableCallbacks();

Enabling callbacks in default mode requires the endpoint to be made uniquely addressable.

Enable callbacks without requests

Endpoints only replying to callbacks with object messages like the following:

public class Handler :
    IHandleMessages<Message>
{
    public Task Handle(Message message, IMessageHandlerContext context)
    {
        var responseMessage = new ResponseMessage
        {
            Property = "PropertyValue"
        };
        return context.Reply(responseMessage);
    }
}

don't require a reference to the callbacks package.

For endpoints replying with int or enum results, the callbacks package can be enabled in response-only mode:

endpointConfiguration.EnableCallbacks(makesRequests: false);