Share via


Service Bus client 3.3.1 is now live

Check out our newest release for the Service Bus client library! This release was primarily focused on messaging and the addition of advanced AMQP runtime features (more details on that to come soon).

This will also be the preferred library version to use with Premium messaging, which will become generally available soon!

The NuGet package can be found at https://www.nuget.org/packages/WindowsAzure.ServiceBus/3.3.1.

Below are the release notes:

  • Messaging: explicit and implicit batching performance improvements for Send and Complete operations.
  • Messaging: fixed explicit and implicit batching logic for send operations with via senders.
  • Messaging: added ability to schedule (and cancel scheduled) messages.
  • Messaging: added Amqp support for runtime operations in both regular and partitioned entities:
    • Batch message operations: Send/Receive/ReceiveBySequenceNumber/Peek
    • Message Lock Renewal
    • Schedule/Cancel Scheduled Messages
    • Add/Remove Rule
    • Session operations: RenewSessionLock/MessagePeek/SetState/GetState
    • Enumerate Sessions
  • EventHub: fixed a bug where 'InvalidOperationException: Collection was modified...' can happen in high throughput send scenario due to serialization race condition.

Here is an example of scheduling and canceling a scheduled message using AMQP. Please note that the syntax is the same whether you are using AMQP or SBMP.

 static async Task ScheduleMessagesSample(string serviceBusConnectionString)
{
    // Set transport type to AMQP
    var builder = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
    builder.TransportType = TransportType.Amqp;

    // Create queue
    NamespaceManager namespaceManager = NamespaceManager.CreateFromConnectionString(builder.ToString());
    QueueDescription queueDescription = new QueueDescription("myqueue") { EnablePartitioning = true };
    namespaceManager.CreateQueue(queueDescription);

    // Create queue client
    MessagingFactory factory = MessagingFactory.CreateFromConnectionString(builder.ToString());
    QueueClient queueClient = factory.CreateQueueClient(queueDescription.Path);

    // Schedule message
    BrokeredMessage message = new BrokeredMessage("Hello");
    long sequenceNumber = await queueClient.ScheduleMessageAsync(message, DateTime.Now + TimeSpan.FromMinutes(10));

    // Cancel scheduled message
    await queueClient.CancelScheduledMessageAsync(sequenceNumber);
}

We have also increased the version on our other 2 NuGet packages to be compatible with 3.3.1. The EPH and perf counters are available here, and here.

Happy messaging!

Comments

  • Anonymous
    July 05, 2016
    When will there be an update to ServiceBus for Windows Server. We have been at 1.1 for a few years now. This disparity between on-premise and azure is hurting our confidence in hybrid development plan. Please give us an update. Doing the Full Azure Stack is too far off and possibly too complex. Service Fabric on -premise is working great for us and is an example of what we need with an update to Service Bus. Thanks.