├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── SECURITY.md ├── samples ├── DotNet │ ├── Azure.Messaging.ServiceBus │ │ ├── BasicSendReceiveTutorialwithFilters │ │ │ ├── BasicSendReceiveTutorialWithFilters.sln │ │ │ ├── BasicSendReceiveTutorialWithFilters │ │ │ │ ├── BasicSendReceiveTutorialWithFilters.csproj │ │ │ │ ├── Extensions.cs │ │ │ │ ├── Item.cs │ │ │ │ ├── Program.cs │ │ │ │ └── SendReceive.cs │ │ │ └── dotnet-basic-send-receive-filters.yml │ │ ├── MessageSender │ │ │ ├── MessageSender.csproj │ │ │ └── Program.cs │ │ ├── ServiceBusEventGridIntegrationV2 │ │ │ ├── ReceiveMessagesFunctionApp │ │ │ │ ├── .gitignore │ │ │ │ ├── FunctionApp1.csproj │ │ │ │ ├── Properties │ │ │ │ │ ├── ServiceDependencies │ │ │ │ │ │ └── FunctionApp120241209224044 - Zip Deploy │ │ │ │ │ │ │ ├── appInsights1.arm.json │ │ │ │ │ │ │ └── storage1.arm.json │ │ │ │ │ ├── serviceDependencies.FunctionApp120241209224044 - Zip Deploy.json │ │ │ │ │ ├── serviceDependencies.json │ │ │ │ │ └── serviceDependencies.local.json │ │ │ │ ├── ReceiveMessagesOnEvent.cs │ │ │ │ └── host.json │ │ │ └── SBEventGridIntegration.sln │ │ └── TopicSubscriptionFilters │ │ │ ├── CreateTopicAndSubscriptions │ │ │ ├── CreateTopicsAndSubscriptions.csproj │ │ │ └── Program.cs │ │ │ ├── Readme.md │ │ │ ├── SendAndReceiveMessages │ │ │ ├── Order.cs │ │ │ ├── Program.cs │ │ │ └── SendAndReceiveMessages.csproj │ │ │ └── TopicSubscriptionFilters.sln │ ├── GettingStarted │ │ ├── BasicSendReceiveQuickStart │ │ │ ├── BasicSendReceiveQuickStart.sln │ │ │ ├── BasicSendReceiveQuickStart │ │ │ │ ├── BasicSendReceiveQuickStart.csproj │ │ │ │ └── Program.cs │ │ │ └── dotnet-basic-send-receive.yml │ │ ├── BasicSendReceiveTutorialwithFilters │ │ │ ├── BasicSendReceiveTutorialWithFilters.sln │ │ │ ├── BasicSendReceiveTutorialWithFilters │ │ │ │ ├── BasicSendReceiveTutorialWithFilters.csproj │ │ │ │ ├── Extensions.cs │ │ │ │ ├── Item.cs │ │ │ │ ├── Program.cs │ │ │ │ └── SendReceive.cs │ │ │ └── dotnet-basic-send-receive-filters.yml │ │ └── Microsoft.Azure.ServiceBus │ │ │ ├── BasicSendReceiveUsingQueueClient │ │ │ ├── BasicSendReceiveUsingQueueClient.csproj │ │ │ ├── Program.cs │ │ │ └── readme.md │ │ │ ├── BasicSendReceiveUsingTopicSubscriptionClient │ │ │ ├── BasicSendReceiveUsingTopicSubscriptionClient.csproj │ │ │ ├── Program.cs │ │ │ └── readme.md │ │ │ ├── BasicSessionSendReceiveUsingQueueClient │ │ │ ├── BasicSessionSendReceiveUsingQueueClient.csproj │ │ │ ├── Program.cs │ │ │ └── readme.md │ │ │ ├── Microsoft.Azure.ServiceBus.Samples.sln │ │ │ ├── SendReceiveUsingMessageSenderReceiver │ │ │ ├── Program.cs │ │ │ ├── SendReceiveUsingMessageSenderReceiver.csproj │ │ │ └── readme.md │ │ │ ├── SessionSendReceiveUsingSessionClient │ │ │ ├── Program.cs │ │ │ ├── SessionSendReceiveUsingSessionClient.csproj │ │ │ └── readme.md │ │ │ └── TopicSubscriptionWithRuleOperationsSample │ │ │ ├── Program.cs │ │ │ ├── TopicSubscriptionWithRuleOperationsSample.csproj │ │ │ └── readme.md │ ├── Microsoft.Azure.ServiceBus │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── AutoForward │ │ │ ├── AutoForward.csproj │ │ │ ├── Program.cs │ │ │ └── readme.md │ │ ├── DeadletterQueue │ │ │ ├── DeadletterQueue.csproj │ │ │ ├── Program.cs │ │ │ └── README.md │ │ ├── Deferral │ │ │ ├── Deferral.csproj │ │ │ ├── Program.cs │ │ │ └── README.md │ │ ├── DuplicateDetection │ │ │ ├── DuplicateDetection.csproj │ │ │ ├── Program.cs │ │ │ └── readme.md │ │ ├── DurableSender │ │ │ ├── Client │ │ │ │ ├── DurableSenderClient.csproj │ │ │ │ └── Program.cs │ │ │ ├── DurableSenderLibrary │ │ │ │ ├── DurableSender.cs │ │ │ │ ├── DurableSenderLibrary.csproj │ │ │ │ └── MsmqHelper.cs │ │ │ └── readme.md │ │ ├── GeoReplication │ │ │ ├── README.md │ │ │ ├── Receiver │ │ │ │ ├── GeoReceiver.csproj │ │ │ │ └── Program.cs │ │ │ ├── SenderActiveReplication │ │ │ │ ├── Program.cs │ │ │ │ └── SenderActiveReplication.csproj │ │ │ └── SenderPassiveReplication │ │ │ │ ├── Program.cs │ │ │ │ └── SenderPassiveReplication.csproj │ │ ├── ManagingEntities │ │ │ ├── QueueCRUD │ │ │ │ ├── Program.cs │ │ │ │ ├── QueueCRUD.csproj │ │ │ │ └── README.md │ │ │ └── SASAuthorizationRule │ │ │ │ ├── Program.cs │ │ │ │ ├── README.md │ │ │ │ └── SASAuthorizationRule.csproj │ │ ├── MessageBrowse │ │ │ ├── MessageBrowse.csproj │ │ │ ├── Program.cs │ │ │ └── README.md │ │ ├── PartitionedQueues │ │ │ ├── PartitionedQueues.csproj │ │ │ ├── Program.cs │ │ │ └── README.md │ │ ├── Prefetch │ │ │ ├── Prefetch.csproj │ │ │ ├── Program.cs │ │ │ └── readme.md │ │ ├── PrioritySubscriptions │ │ │ ├── PrioritySubscriptions.csproj │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── bins │ │ │ │ ├── SampleManager.exe.config │ │ │ │ ├── SampleManager.vshost.exe.config │ │ │ │ └── SampleManager.vshost.exe.manifest │ │ ├── QueuesGettingStarted │ │ │ ├── Program.cs │ │ │ ├── QueuesGettingStarted.csproj │ │ │ └── README.md │ │ ├── QueuesRequestResponse │ │ │ ├── Client │ │ │ │ ├── Client.csproj │ │ │ │ ├── Program.cs │ │ │ │ └── RequestReplySender.cs │ │ │ ├── README.md │ │ │ ├── Server │ │ │ │ ├── DelegatingTokenProvider.cs │ │ │ │ ├── RequestReplyResponder.cs │ │ │ │ ├── Server.cs │ │ │ │ └── Server.csproj │ │ │ └── bins │ │ │ │ ├── Microsoft.ServiceBus.xml │ │ │ │ ├── Microsoft.WindowsAzure.Configuration.xml │ │ │ │ ├── RequestResponseSampleClient.exe.config │ │ │ │ ├── RequestResponseSampleClient.vshost.exe.config │ │ │ │ ├── RequestResponseSampleClient.vshost.exe.manifest │ │ │ │ ├── RequestResponseSampleServer.exe.config │ │ │ │ ├── RequestResponseSampleServer.vshost.exe.config │ │ │ │ ├── RequestResponseSampleServer.vshost.exe.manifest │ │ │ │ ├── SampleManager.exe.config │ │ │ │ └── SampleManager.vshost.exe.manifest │ │ ├── README.md │ │ ├── ReceiveLoop │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── ReceiveLoop.csproj │ │ ├── RoleBasedAccessControl │ │ │ ├── App.config │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ ├── RoleBasedAccessControl.csproj │ │ │ └── RoleBasedAccessControl.sln │ │ ├── SamplesTest │ │ │ ├── SamplesTest.csproj │ │ │ └── SamplesTestRun.cs │ │ ├── ScheduledMessages │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── ScheduledMessages.csproj │ │ ├── SendersReceiversWithQueues │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── SendersReceiversWithQueues.csproj │ │ ├── SendersReceiversWithTopics │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── SendersReceiversWithTopics.csproj │ │ ├── ServiceBusMessagingSamples.sln │ │ ├── SessionState │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── SessionState.csproj │ │ ├── Sessions │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── Sessions.csproj │ │ ├── TimeToLive │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── TimeToLive.csproj │ │ ├── TopicFilters │ │ │ ├── Order.cs │ │ │ ├── Program.cs │ │ │ ├── TopicFilters.csproj │ │ │ └── readme.md │ │ ├── TopicsGettingStarted │ │ │ ├── Program.cs │ │ │ ├── README.md │ │ │ └── TopicsGettingStarted.csproj │ │ ├── TransactionsAndSendVia │ │ │ ├── TransactionsAndSendVia │ │ │ │ ├── AMQPTransactionsSendVia │ │ │ │ │ ├── Message.cs │ │ │ │ │ ├── MessageHelper.cs │ │ │ │ │ ├── Program.cs │ │ │ │ │ └── TransactionsAndSendVia.csproj │ │ │ │ └── TransactionsAndSendVia.sln │ │ │ └── readme.md │ │ ├── common │ │ │ ├── Main.cs │ │ │ └── Main.md │ │ ├── messaging-samples.yml │ │ └── scripts │ │ │ ├── azuredeploy.json │ │ │ ├── azuredeploy.parameters.json │ │ │ ├── metadata.json │ │ │ ├── setupenv.ps1 │ │ │ └── setupenv.sh │ └── Microsoft.ServiceBus.Messaging │ │ ├── .vscode │ │ └── tasks.json │ │ ├── AtomicTransactions │ │ ├── AtomicTransactions.csproj │ │ ├── Program.cs │ │ ├── SagaTaskManager.cs │ │ ├── TravelBookingHandlers.cs │ │ └── readme.md │ │ ├── AutoForward │ │ ├── AutoForward.csproj │ │ ├── Program.cs │ │ └── readme.md │ │ ├── DeadletterQueue │ │ ├── DeadletterQueue.csproj │ │ ├── Program.cs │ │ └── README.md │ │ ├── Deferral │ │ ├── Deferral.csproj │ │ ├── Program.cs │ │ └── README.md │ │ ├── DuplicateDetection │ │ ├── DuplicateDetection.csproj │ │ ├── Program.cs │ │ └── readme.md │ │ ├── DurableSender │ │ ├── Client │ │ │ ├── DurableSenderClient.csproj │ │ │ └── Program.cs │ │ ├── DurableSenderLibrary │ │ │ ├── DurableSender.cs │ │ │ ├── DurableSenderLibrary.csproj │ │ │ └── MsmqHelper.cs │ │ └── readme.md │ │ ├── GeoDR │ │ ├── README.md │ │ ├── SBGeoDR2 │ │ │ ├── Management.ps1 │ │ │ ├── Management.py │ │ │ ├── SBGeoDR2 │ │ │ │ ├── App.config │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── README.md │ │ │ │ ├── SBGeoDR2.csproj │ │ │ │ ├── SBGeoDR2.sln │ │ │ │ └── packages.config │ │ │ └── SBGeoDR_existing_namespace_name │ │ │ │ ├── App.config │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── README.md │ │ │ │ ├── SBGeoDR2_existing_namespace_name.csproj │ │ │ │ ├── SBGeoDR2_existing_namespace_name.sln │ │ │ │ └── packages.config │ │ └── TestGeoDR │ │ │ └── ConsoleApp1 │ │ │ ├── App.config │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ ├── README.md │ │ │ ├── TestGeoDR.csproj │ │ │ ├── TestGeoDR.sln │ │ │ └── packages.config │ │ ├── GeoReplication │ │ ├── README.md │ │ ├── Receiver │ │ │ ├── GeoReceiver.csproj │ │ │ └── Program.cs │ │ ├── SenderActiveReplication │ │ │ ├── Program.cs │ │ │ ├── SenderActiveReplication.csproj │ │ │ └── app.config │ │ └── SenderPassiveReplication │ │ │ ├── Program.cs │ │ │ └── SenderPassiveReplication.csproj │ │ ├── ManagedServiceIdentity │ │ ├── ManagedServiceIdentityWebApp.sln │ │ ├── ManagedServiceIdentityWebApp │ │ │ ├── ManagedServiceIdentityWebApp.csproj │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ ├── StyleSheet.css │ │ │ ├── Web.Debug.config │ │ │ ├── Web.Release.config │ │ │ ├── Web.config │ │ │ ├── default.aspx │ │ │ ├── default.aspx.cs │ │ │ ├── default.aspx.designer.cs │ │ │ └── packages.config │ │ └── README.md │ │ ├── MessageBrowse │ │ ├── MessageBrowse.csproj │ │ ├── Program.cs │ │ └── README.md │ │ ├── MessageSender │ │ ├── MessageSender.csproj │ │ └── Program.cs │ │ ├── NetMessagingBinding │ │ ├── Client │ │ │ ├── NetMessagingBindingClient.csproj │ │ │ ├── Program.cs │ │ │ └── app.config │ │ ├── Readme.md │ │ ├── Service │ │ │ ├── IOnewayServiceContract.cs │ │ │ ├── NetMessagingBindingService.csproj │ │ │ ├── OnewayService.cs │ │ │ ├── Program.cs │ │ │ └── app.config │ │ └── ServiceDiagram.jpg │ │ ├── NetMessagingSession │ │ ├── Client │ │ │ ├── NetMessagingSessionClient.csproj │ │ │ ├── Program.cs │ │ │ └── app.config │ │ ├── OrderService │ │ │ ├── ErrorHandler.cs │ │ │ ├── ISequenceServiceContract.cs │ │ │ ├── NetMessagingSessionService.csproj │ │ │ ├── Program.cs │ │ │ ├── SequenceItem.cs │ │ │ ├── SequenceProcessingService.cs │ │ │ └── app.config │ │ ├── README.md │ │ └── ServiceDiagram.jpg │ │ ├── PartitionedQueues │ │ ├── PartitionedQueues.csproj │ │ ├── Program.cs │ │ └── README.md │ │ ├── PerformanceCounters │ │ ├── .nuget │ │ │ ├── NuGet.Config │ │ │ └── NuGet.targets │ │ ├── PerformanceCounterSetup │ │ │ ├── PerformanceCounterSetup.ccproj │ │ │ ├── ServiceConfiguration.Cloud.cscfg │ │ │ ├── ServiceConfiguration.Local.cscfg │ │ │ ├── ServiceDefinition.csdef │ │ │ └── WorkerRole1Content │ │ │ │ └── diagnostics.wadcfgx │ │ ├── Readme.md │ │ ├── ServiceBusPerfCounters │ │ │ ├── ServiceBusPerfCounters.ccproj │ │ │ ├── ServiceConfiguration.Cloud.cscfg │ │ │ ├── ServiceConfiguration.Local.cscfg │ │ │ ├── ServiceDefinition.csdef │ │ │ └── WorkerRole1Content │ │ │ │ └── diagnostics.wadcfg │ │ └── WorkerRole1 │ │ │ ├── Performance │ │ │ └── Microsoft.ServiceBus.MessagingPerformanceCounters.man │ │ │ ├── RegisterMessagingPerfCounter.cmd │ │ │ ├── Tracing │ │ │ └── Microsoft.ServiceBus.EventDefinitions.man │ │ │ ├── WorkerRole.cs │ │ │ ├── WorkerRole1.csproj │ │ │ └── app.config │ │ ├── Prefetch │ │ ├── Prefetch.csproj │ │ ├── Program.cs │ │ └── readme.md │ │ ├── PrioritySubscriptions │ │ ├── PrioritySubscriptions.csproj │ │ ├── Program.cs │ │ └── README.md │ │ ├── QueuesGettingStarted │ │ ├── QueuesGettingStarted.csproj │ │ ├── README.md │ │ └── program.cs │ │ ├── QueuesRequestResponse │ │ ├── Client │ │ │ ├── Client.csproj │ │ │ ├── Program.cs │ │ │ ├── RequestReplySender.cs │ │ │ └── app.config │ │ ├── README.md │ │ ├── Server │ │ │ ├── DelegatingTokenProvider.cs │ │ │ ├── RequestReplyResponder.cs │ │ │ ├── Server.cs │ │ │ └── Server.csproj │ │ └── bins │ │ │ ├── Microsoft.ServiceBus.xml │ │ │ ├── Microsoft.WindowsAzure.Configuration.xml │ │ │ ├── RequestResponseSampleClient.exe.config │ │ │ ├── RequestResponseSampleClient.vshost.exe.config │ │ │ ├── RequestResponseSampleClient.vshost.exe.manifest │ │ │ ├── RequestResponseSampleServer.exe.config │ │ │ ├── RequestResponseSampleServer.vshost.exe.config │ │ │ ├── RequestResponseSampleServer.vshost.exe.manifest │ │ │ ├── SampleManager.exe.config │ │ │ └── SampleManager.vshost.exe.manifest │ │ ├── README.md │ │ ├── ReceiveLoop │ │ ├── Program.cs │ │ ├── README.md │ │ └── ReceiveLoop.csproj │ │ ├── RoleBasedAccessControl │ │ ├── App.config │ │ ├── Program.cs │ │ ├── README.md │ │ ├── RoleBasedAccessControl.csproj │ │ └── RoleBasedAccessControl.sln │ │ ├── SamplesTest │ │ ├── SamplesTest.csproj │ │ ├── SamplesTest.dll.config │ │ └── SamplesTestRun.cs │ │ ├── ScheduledMessages │ │ ├── Program.cs │ │ ├── README.md │ │ └── ScheduledMessages.csproj │ │ ├── SendersReceiversWithQueues │ │ ├── Program.cs │ │ ├── README.md │ │ └── SendersReceiversWithQueues.csproj │ │ ├── SendersReceiversWithTopics │ │ ├── Program.cs │ │ ├── README.md │ │ ├── SendersReceiversWithTopics.csproj │ │ └── app.config │ │ ├── ServiceBusEventGridIntegration │ │ ├── SBEventGridIntegration.sln │ │ └── SBEventGridIntegration │ │ │ ├── .gitignore │ │ │ ├── ReceiveMessagesOnEvent.cs │ │ │ ├── SBEventGridIntegration.csproj │ │ │ └── host.json │ │ ├── ServiceBusMessagingSamples.sln │ │ ├── SessionState │ │ ├── Program.cs │ │ ├── README.md │ │ └── SessionState.csproj │ │ ├── Sessions │ │ ├── Program.cs │ │ ├── README.md │ │ └── Sessions.csproj │ │ ├── TimeToLive │ │ ├── Program.cs │ │ ├── README.md │ │ └── TimeToLive.csproj │ │ ├── TopicFilters │ │ ├── Order.cs │ │ ├── Program.cs │ │ ├── TopicFilters.csproj │ │ └── readme.md │ │ ├── TopicsGettingStarted │ │ ├── README.md │ │ ├── TopicsGettingStarted.csproj │ │ ├── app.config │ │ └── program.cs │ │ ├── common │ │ ├── Main.cs │ │ └── Main.md │ │ └── scripts │ │ ├── azuredeploy.json │ │ ├── azuredeploy.parameters.json │ │ ├── metadata.json │ │ ├── sampleenv.ps1 │ │ └── sampleenv.sh ├── Java │ ├── .gitignore │ ├── .project │ ├── .vscode │ │ ├── settings.json │ │ └── tasks.json │ ├── azure-servicebus │ │ ├── AutoForward │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── autoforward │ │ │ │ │ │ └── AutoForward.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── autoforward │ │ │ │ └── AutoForwardTest.java │ │ ├── DeadletterQueue │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── deadletterqueue │ │ │ │ │ │ └── DeadletterQueue.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── deadletterqueue │ │ │ │ └── DeadletterQueueTest.java │ │ ├── DuplicateDetection │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── duplicatedetection │ │ │ │ │ │ └── DuplicateDetection.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── duplicatedetection │ │ │ │ └── DuplicateDetectionTest.java │ │ ├── ManagingEntity │ │ │ ├── .classpath │ │ │ ├── .vscode │ │ │ │ └── launch.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── managingentity │ │ │ │ │ │ └── ManagingEntity.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── managingentity │ │ │ │ └── ManagingEntityTest.java │ │ ├── ManagingTopicRules │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── managingtopicrules │ │ │ │ └── ManagingTopicRules.java │ │ ├── MessageBrowse │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── messagebrowse │ │ │ │ │ │ └── MessageBrowse.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── messagebrowse │ │ │ │ └── MessageBrowseTest.java │ │ ├── PartitionedQueues │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── partitionedqueues │ │ │ │ │ │ └── PartitionedQueues.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── partitionedqueues │ │ │ │ └── PartitionedQueuesTest.java │ │ ├── Prefetch │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── prefetch │ │ │ │ │ │ └── Prefetch.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── prefetch │ │ │ │ └── PrefetchTest.java │ │ ├── QueuesGettingStarted │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── queuesgettingstarted │ │ │ │ │ │ └── QueuesGettingStarted.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── queuesgettingstarted │ │ │ │ └── QueuesGettingStartedTest.java │ │ ├── QueuesWithProxy │ │ │ ├── .classpath │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── queueswithproxy │ │ │ │ │ │ └── QueuesWithProxy.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── queueswithproxy │ │ │ │ └── QueuesWithProxyTest.java │ │ ├── README.md │ │ ├── ReceiveLoop │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── receiveloop │ │ │ │ │ │ └── ReceiveLoop.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── receiveloop │ │ │ │ └── ReceiveLoopTest.java │ │ ├── SasAuthorization │ │ │ ├── .classpath │ │ │ ├── .vscode │ │ │ │ └── settings.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── microsoft │ │ │ │ │ └── azure │ │ │ │ │ └── servicebus │ │ │ │ │ └── samples │ │ │ │ │ └── sasauthorization │ │ │ │ │ └── SasAuthorization.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── sasauthorization │ │ │ │ └── SasAuthorizationTest.java │ │ ├── ScheduledMessages │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── scheduledmessages │ │ │ │ │ │ └── ScheduledMessages.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── scheduledmessages │ │ │ │ └── ScheduledMessagesTest.java │ │ ├── TimeToLive │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── timetolive │ │ │ │ │ │ └── TimeToLive.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── timetolive │ │ │ │ └── TimeToLiveTest.java │ │ ├── TopicFilters │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── topicfilters │ │ │ │ │ │ ├── Order.java │ │ │ │ │ │ └── TopicFilters.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── topicfilters │ │ │ │ └── TopicFiltersTest.java │ │ └── TopicsGettingStarted │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ ├── javaconfig.json │ │ │ ├── launch.json │ │ │ ├── settings.json │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── microsoft │ │ │ │ │ └── azure │ │ │ │ │ └── servicebus │ │ │ │ │ └── samples │ │ │ │ │ └── topicsgettingstarted │ │ │ │ │ └── TopicsGettingStarted.java │ │ │ └── resources │ │ │ │ └── log4j.properties │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── microsoft │ │ │ └── azure │ │ │ └── servicebus │ │ │ └── samples │ │ │ └── topicsgettingstarted │ │ │ └── TopicsGettingStartedTest.java │ ├── java-sample.yml │ ├── pom.xml │ ├── qpid-jms-client │ │ ├── JmsQueueQuickstart │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ │ ├── javaconfig.json │ │ │ │ ├── launch.json │ │ │ │ ├── settings.json │ │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── microsoft │ │ │ │ │ │ └── azure │ │ │ │ │ │ └── servicebus │ │ │ │ │ │ └── samples │ │ │ │ │ │ └── jmsqueuequickstart │ │ │ │ │ │ └── JmsQueueQuickstart.java │ │ │ │ └── resources │ │ │ │ │ └── log4j.properties │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── microsoft │ │ │ │ └── azure │ │ │ │ └── servicebus │ │ │ │ └── samples │ │ │ │ └── jmsqueuequickstart │ │ │ │ └── JmsQueueQuickstartTest.java │ │ └── JmsTopicQuickstart │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .vscode │ │ │ ├── javaconfig.json │ │ │ ├── launch.json │ │ │ ├── settings.json │ │ │ └── tasks.json │ │ │ ├── pom.xml │ │ │ ├── readme.md │ │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── microsoft │ │ │ │ │ └── azure │ │ │ │ │ └── servicebus │ │ │ │ │ └── samples │ │ │ │ │ └── jmstopicquickstart │ │ │ │ │ └── JmsTopicQuickstart.java │ │ │ └── resources │ │ │ │ └── log4j.properties │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── microsoft │ │ │ └── azure │ │ │ └── servicebus │ │ │ └── samples │ │ │ └── jmstopicquickstart │ │ │ └── JmsTopicQuickstartTest.java │ ├── readme.md │ └── scripts │ │ ├── azuredeploy.json │ │ ├── azuredeploy.parameters.json │ │ ├── metadata.json │ │ ├── sampleenv.ps1 │ │ └── sampleenv.sh ├── Management │ ├── CreateQueue │ │ ├── CreateQueue.ps1 │ │ └── CreateQueue.py │ ├── CreateTopicWithSubscriptionsAndRules │ │ ├── SubscriptionFilterCli.py │ │ └── SubscriptionFilterPS.ps1 │ ├── GeoDR │ │ ├── README.md │ │ ├── SBGeoDR2 │ │ │ ├── Management.ps1 │ │ │ ├── Management.py │ │ │ ├── SBGeoDR2 │ │ │ │ ├── App.config │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── README.md │ │ │ │ ├── SBGeoDR2.csproj │ │ │ │ ├── SBGeoDR2.sln │ │ │ │ └── packages.config │ │ │ └── SBGeoDR_existing_namespace_name │ │ │ │ ├── App.config │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── README.md │ │ │ │ ├── SBGeoDR2_existing_namespace_name.csproj │ │ │ │ ├── SBGeoDR2_existing_namespace_name.sln │ │ │ │ └── packages.config │ │ └── TestGeoDR │ │ │ └── ConsoleApp1 │ │ │ ├── App.config │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ ├── README.md │ │ │ ├── TestGeoDR.csproj │ │ │ ├── TestGeoDR.sln │ │ │ └── packages.config │ └── Metrics │ │ ├── AccessServiceBusMetricsViaCode.sln │ │ └── AccessServiceBusMetricsViaCode │ │ ├── AccessServiceBusMetricsViaCode.csproj │ │ └── Program.cs └── readme.md └── service-bus.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Default behavior: if Git thinks a file is text (as opposed to binary), it 2 | # will normalize line endings to LF in the repository, but convert to your 3 | # platform's native line endings on checkout (e.g., CRLF for Windows). 4 | * text=auto 5 | 6 | # Explicitly declare text files you want to always be normalized and converted 7 | # to native line endings on checkout. E.g., 8 | #*.c text 9 | 10 | # Declare files that will always have CRLF line endings on checkout. E.g., 11 | #*.sln text eol=crlf 12 | 13 | # Declare files that will always have LF line endings on checkout. E.g., 14 | *.sh text eol=lf 15 | 16 | # Denote all files that should not have line endings normalized, should not be 17 | # merged, and should not show in a textual diff. 18 | *.docm binary 19 | *.docx binary 20 | *.ico binary 21 | *.lib binary 22 | *.png binary 23 | *.pptx binary 24 | *.snk binary 25 | *.vsdx binary 26 | *.xps binary 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 9 | 10 | ## Actual Behavior 11 | 1. 12 | 2. 13 | 14 | ## Expected Behavior 15 | 1. 16 | 2. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Screenshots** 20 | If applicable, add screenshots to help explain your problem. 21 | 22 | **SDK version** 23 | If applicable, provide the exact version of the SDK being used. 24 | 25 | **Additional context** 26 | Add any other context about the problem here. 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the scenario which this will help with** 14 | A clear description of the scenarios you are using this for, and how this will help make those scenarios better. 15 | 16 | **Describe the solution you'd like** 17 | A clear and concise description of what you want to happen. 18 | 19 | **Describe alternatives you've considered** 20 | A clear and concise description of any alternative solutions or features you've considered. 21 | 22 | **Additional context** 23 | Add any other context or screenshots about the feature request here. 24 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 7 | 8 | This checklist is used to make sure that common guidelines for a pull request are followed. 9 | 10 | - [ ] **I have read the [contribution guidelines](./CONTRIBUTING.md).** 11 | - [ ] Title of the pull request is clear and informative. 12 | - [ ] If applicable, the code is properly documented. 13 | - [ ] The code builds without any errors. -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dotnet"] 2 | path = dotnet 3 | url = https://github.com/Azure/azure-service-bus-dotnet.git 4 | branch = dev 5 | [submodule "java"] 6 | path = java 7 | url = https://github.com/Azure/azure-service-bus-java.git 8 | branch = dev 9 | 10 | [submodule "MgmtAADJavaTopics"] 11 | path = samples/Management/service-bus-java-manage-publish-subscribe-with-basic-features 12 | url = https://github.com/Azure-Samples/service-bus-java-manage-publish-subscribe-with-basic-features.git 13 | branch = master 14 | [submodule "MgmtAADJavaQueues"] 15 | path = samples/Management/service-bus-java-manage-queue-with-advanced-features 16 | url = https://github.com/Azure-Samples/service-bus-java-manage-queue-with-advanced-features.git 17 | branch = master 18 | [submodule "PerformanceTesting"] 19 | path = samples/DotNet/service-bus-dotnet-messaging-performance 20 | url = https://github.com/Azure-Samples/service-bus-dotnet-messaging-performance.git 21 | branch = master 22 | [submodule "MgmtAADDotNet"] 23 | path = samples/Management/service-bus-dotnet-management 24 | url = https://github.com/Azure-Samples/service-bus-dotnet-management.git 25 | branch = master 26 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Microsoft Azure Service Bus 3 |

4 | 5 | # Microsoft Azure Service Bus 6 | 7 | To learn more about Azure Service Bus, please visit our [start page](https://azure.microsoft.com/services/service-bus/). 8 | 9 | This repository is intended to be used for the following: 10 | * **Service side** issues and feature requests. Please file issues here in this repository or raise suggestions at [Azure Feedback](https://feedback.azure.com/d365community/forum/7c0a897d-2125-ec11-b6e6-000d3a4f0f84) 11 | * [Samples](./samples/readme.md) 12 | * Reports of documentation issues 13 | 14 | If you are looking for the code of a specific client library, see the following for a list of available libraries in each supported language: [link](https://github.com/Azure/azure-sdk) 15 | 16 | ## How to provide feedback 17 | 18 | See our [Contribution Guidelines](./.github/CONTRIBUTING.md). 19 | 20 | ## Issue response times 21 | 22 | We are trying to do our best, to at least reply to issues as fast as possible, yet in most cases please expect 5-7 business days. 23 | -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/BasicSendReceiveTutorialwithFilters/BasicSendReceiveTutorialWithFilters/BasicSendReceiveTutorialWithFilters.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/BasicSendReceiveTutorialwithFilters/BasicSendReceiveTutorialWithFilters/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | //using Microsoft.Azure.ServiceBus; 5 | using Newtonsoft.Json; 6 | using Azure.Messaging.ServiceBus; 7 | using System; 8 | 9 | namespace BasicSendReceiveTutorialWithFilters 10 | { 11 | public static class Extensions 12 | { 13 | public static T As(this ServiceBusReceivedMessage message) where T : class 14 | { 15 | return JsonConvert.DeserializeObject(Encoding.UTF8.GetString(message.Body.ToArray())); 16 | } 17 | public static ServiceBusMessage AsMessage(this object obj) 18 | { 19 | return new ServiceBusMessage(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(obj))); 20 | } 21 | 22 | public static bool Any(this IList collection) 23 | { 24 | return collection != null && collection.Count > 0; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/BasicSendReceiveTutorialwithFilters/dotnet-basic-send-receive-filters.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: 'Azure Service Bus - Basic Send/Receieve with Filters in .NET' 4 | description: 'A sample demonstrating the basic send/receive operations with Azure Service Bus, using the .NET platform.' 5 | generateZip: true 6 | author: celemensv 7 | languages: 8 | - csharp 9 | technologies: 10 | - service-bus 11 | - service-bus-messaging 12 | - azure 13 | -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/MessageSender/MessageSender.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 8.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/ServiceBusEventGridIntegrationV2/ReceiveMessagesFunctionApp/FunctionApp1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | v4 5 | <_FunctionsSkipCleanOutput>true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | PreserveNewest 19 | Never 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/ServiceBusEventGridIntegrationV2/ReceiveMessagesFunctionApp/Properties/serviceDependencies.FunctionApp120241209224044 - Zip Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/microsoft.insights/components/FunctionApp1", 5 | "type": "appInsights.azure", 6 | "connectionId": "APPLICATIONINSIGHTS_CONNECTION_STRING" 7 | }, 8 | "storage1": { 9 | "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/functionapp1202412092240", 10 | "type": "storage.azure", 11 | "connectionId": "AzureWebJobsStorage" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/ServiceBusEventGridIntegrationV2/ReceiveMessagesFunctionApp/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "type": "appInsights", 5 | "connectionId": "APPLICATIONINSIGHTS_CONNECTION_STRING" 6 | }, 7 | "storage1": { 8 | "type": "storage", 9 | "connectionId": "AzureWebJobsStorage" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/ServiceBusEventGridIntegrationV2/ReceiveMessagesFunctionApp/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "type": "appInsights.sdk" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/ServiceBusEventGridIntegrationV2/ReceiveMessagesFunctionApp/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | }, 9 | "enableLiveMetricsFilters": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/TopicSubscriptionFilters/CreateTopicAndSubscriptions/CreateTopicsAndSubscriptions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/TopicSubscriptionFilters/SendAndReceiveMessages/Order.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | //---------------------------------------------------------------- 4 | 5 | namespace SendAndReceiveMessages 6 | { 7 | class Order 8 | { 9 | public string Color 10 | { 11 | get; 12 | set; 13 | } 14 | 15 | public int Quantity 16 | { 17 | get; 18 | set; 19 | } 20 | 21 | public string Priority 22 | { 23 | get; 24 | set; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/DotNet/Azure.Messaging.ServiceBus/TopicSubscriptionFilters/SendAndReceiveMessages/SendAndReceiveMessages.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/BasicSendReceiveQuickStart/BasicSendReceiveQuickStart/BasicSendReceiveQuickStart.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/BasicSendReceiveQuickStart/dotnet-basic-send-receive.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: 'Azure Service Bus - Basic Send/Receieve in .NET' 4 | description: 'A sample demonstrating the basic send/receive operations with Azure Service Bus, using the .NET platform.' 5 | generateZip: true 6 | author: celemensv 7 | languages: 8 | - csharp 9 | technologies: 10 | - service-bus 11 | - service-bus-messaging 12 | - azure 13 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/BasicSendReceiveTutorialwithFilters/BasicSendReceiveTutorialWithFilters/BasicSendReceiveTutorialWithFilters.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/BasicSendReceiveTutorialwithFilters/BasicSendReceiveTutorialWithFilters/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.Azure.ServiceBus; 5 | using Newtonsoft.Json; 6 | 7 | namespace BasicSendReceiveTutorialWithFilters 8 | { 9 | public static class Extensions 10 | { 11 | public static T As(this Message message) where T : class 12 | { 13 | return JsonConvert.DeserializeObject(Encoding.UTF8.GetString(message.Body)); 14 | } 15 | public static Message AsMessage(this object obj) 16 | { 17 | return new Message(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(obj))); 18 | } 19 | 20 | public static bool Any(this IList collection) 21 | { 22 | return collection != null && collection.Count > 0; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/BasicSendReceiveTutorialwithFilters/dotnet-basic-send-receive-filters.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: 'Azure Service Bus - Basic Send/Receieve with Filters in .NET' 4 | description: 'A sample demonstrating the basic send/receive operations with Azure Service Bus, using the .NET platform.' 5 | generateZip: true 6 | author: celemensv 7 | languages: 8 | - csharp 9 | technologies: 10 | - service-bus 11 | - service-bus-messaging 12 | - azure 13 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/Microsoft.Azure.ServiceBus/BasicSendReceiveUsingQueueClient/BasicSendReceiveUsingQueueClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/Microsoft.Azure.ServiceBus/BasicSendReceiveUsingTopicSubscriptionClient/BasicSendReceiveUsingTopicSubscriptionClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/Microsoft.Azure.ServiceBus/BasicSessionSendReceiveUsingQueueClient/BasicSessionSendReceiveUsingQueueClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/Microsoft.Azure.ServiceBus/SendReceiveUsingMessageSenderReceiver/SendReceiveUsingMessageSenderReceiver.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/Microsoft.Azure.ServiceBus/SessionSendReceiveUsingSessionClient/SessionSendReceiveUsingSessionClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/GettingStarted/Microsoft.Azure.ServiceBus/TopicSubscriptionWithRuleOperationsSample/TopicSubscriptionWithRuleOperationsSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "build", 8 | "type": "process", 9 | "command": "msbuild", 10 | "args": [ 11 | // Ask msbuild to generate full paths for file names. 12 | "/property:GenerateFullPaths=true", 13 | "/t:build" 14 | ], 15 | "group": "build", 16 | "presentation": { 17 | // Reveal the output only if unrecognized errors occur. 18 | "reveal": "silent" 19 | }, 20 | // Use the standard MS compiler pattern to detect errors, warnings and infos 21 | "problemMatcher": "$msCompile" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/AutoForward/AutoForward.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/DeadletterQueue/DeadletterQueue.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/Deferral/Deferral.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/DuplicateDetection/DuplicateDetection.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | MessagingSamples 6 | DuplicateDetection 7 | net462;netcoreapp2.0 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/DurableSender/Client/DurableSenderClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/DurableSender/DurableSenderLibrary/DurableSenderLibrary.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net462 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/GeoReplication/README.md: -------------------------------------------------------------------------------- 1 | # Geo-Replicated Senders -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/GeoReplication/Receiver/GeoReceiver.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/GeoReplication/SenderActiveReplication/SenderActiveReplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/GeoReplication/SenderPassiveReplication/SenderPassiveReplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ManagingEntities/QueueCRUD/QueueCRUD.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ManagingEntities/QueueCRUD/README.md: -------------------------------------------------------------------------------- 1 | # Managing Azure Service Bus Queues 2 | 3 | This sample shows the essential API elements for managing a 4 | Service Bus Queue. Topics and Subscriptions can be managed similarly. 5 | 6 | You will learn how to create a new queue, retrieve/get an existing queue, 7 | update an existing queue, or delete the queue. 8 | 9 | You will also learn about manipulating properties of the queue 10 | so as to optimize to your scenario. 11 | 12 | Refer to the main [README](../../README.md) document for setup instructions. 13 | 14 | ## Sample Code 15 | 16 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 17 | 18 | This sample creates a new Queue, retrieves the same, updates few properties and finally deletes it. 19 | We also retrieve the runtime information of the queue which shows the current status on 20 | number of messages, size of the queue, last accessed / updated time etc. 21 | It also shows details on how the messages are spread between 22 | active messages and deadlettered / scheduled messages. 23 | 24 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ManagingEntities/SASAuthorizationRule/README.md: -------------------------------------------------------------------------------- 1 | # Managing Azure Service Bus Queues 2 | 3 | This sample guides you through SharedAccessSignature(SAS) authentication support provided by the library 4 | to customize authorization to your Service Bus entity. 5 | 6 | You will learn 7 | 1. how to generate a new SAS policy for a topic which a specific type of claim. (send-only/receive-only). 8 | 1. how to generate a SAS token based on an existing SAS policy which only applies to a specific subscription. 9 | 10 | Refer to the main [README](../../README.md) document for setup instructions. 11 | 12 | ## Sample Code 13 | 14 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 15 | 16 | The sample creates a Topic with 2 subscriptions. 17 | We then generate a send-only SAS policy and another receive-only SAS policy. 18 | We then validate 19 | 1. send-only SAS could be used to send but not to receive. 20 | 2. receive-only SAS could be used to receive but not to send. 21 | 3. SAS token generated for subscription1 throws when being used for subscription2. 22 | 23 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ManagingEntities/SASAuthorizationRule/SASAuthorizationRule.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/MessageBrowse/MessageBrowse.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/MessageBrowse/README.md: -------------------------------------------------------------------------------- 1 | # Message Browsing (Peek) 2 | 3 | This sample shows how to enumerate messages residing in a Queue or Topic 4 | subscription without locking and/or deleting them. This feature is typically 5 | used for diagnostic and troubleshooting purposes and/or for tooling built on top 6 | of Service Bus. 7 | 8 | [Read more about message browsing in the documentation.][1] 9 | 10 | Refer to the main [README](../README.md) document for setup instructions. 11 | 12 | ## Sample Code 13 | 14 | The sample sends a set of messages into a queue and then enumerates them. When 15 | you run the sample repeatedly, you will see that messages accumulate in the log 16 | as we don't receive and remove them. 17 | 18 | You will also observe that expired messages (we send with a 2 minute 19 | time-to-live setting) may hang around past their expiration time, because 20 | Service Bus lazily cleans up expired messages no longer available for regular 21 | retrieval. 22 | 23 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 24 | 25 | 26 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/message-browsing -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PartitionedQueues/PartitionedQueues.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PartitionedQueues/README.md: -------------------------------------------------------------------------------- 1 | # Partitioned Queues 2 | 3 | This sample illustrates the specifics of partitioned queues. Service Bus creates 4 | "partitioned" queues by default, which means that the queue log is distributed across 5 | multiple storage backends for minimizing availability risks. This behavior has impact on 6 | the order in which messages will be retrieved, and it also has impact on the sequence 7 | numbering scheme. This sample illustrates this. 8 | 9 | [Read more on partitioning in the documentation][1]. 10 | 11 | Refer to the main [README](../README.md) document for setup instructions. 12 | 13 | ## Sample Code 14 | 15 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 16 | 17 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/Prefetch/Prefetch.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/Prefetch/readme.md: -------------------------------------------------------------------------------- 1 | # Prefetch 2 | This sample illustrates the the "prefetch" feature of the Service Bus client. 3 | 4 | The sample is specifically crafted to demonstrate the throughput difference 5 | between receiving messages with prefetch turned on and prefetch turned off. The 6 | default setting is for prefetch to be turned off. 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | [Read more about the prefetch feature in the documentation.][1] 11 | 12 | ## Sample Code 13 | 14 | The sample performs two send and receive sequences, once with prefetch turned on 15 | and once with prefetch turned off. You will observe that the variant with 16 | prefetch turned on yields higher throughput, and therefore a shorter execution 17 | time. 18 | 19 | The sample is further documented inline in the [Program.cs](Program.cs) C# file. 20 | 21 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-prefetch -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PrioritySubscriptions/PrioritySubscriptions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PrioritySubscriptions/README.md: -------------------------------------------------------------------------------- 1 | # Priority Subscriptions 2 | 3 | This sample illustrates how do use topic subscriptions and filters for splitting 4 | up a message streams into multiple distinct streams based on certain conditions. 5 | 6 | The concrete example use-case shown here is prioritization, where we split the 7 | message stream into three distinct streams, with processing priorities 1 and 2 8 | having their own subscriptions, and priorities 3 and below having a shared 9 | subscription. Splitting up the message stream for routing to particular 10 | consumers for any other reason will look quite similar. 11 | 12 | ## Prerequisites and Setup 13 | 14 | Refer to the main [README](../README.md) document for setup instructions. 15 | 16 | ## Sample Code 17 | 18 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PrioritySubscriptions/bins/SampleManager.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PrioritySubscriptions/bins/SampleManager.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/PrioritySubscriptions/bins/SampleManager.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesGettingStarted/QueuesGettingStarted.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesGettingStarted/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Service Bus Queues 2 | 3 | This sample shows the essential API elements for interacting with messages and a 4 | Service Bus Queue. 5 | 6 | You will learn how to establish a connection, and to send and receive messages, 7 | and you will learn about the most important properties of Service Bus messages. 8 | 9 | Refer to the main [README](../README.md) document for setup instructions. 10 | 11 | ## Sample Code 12 | 13 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 14 | 15 | To keep things reasonably simple, the sample program keeps message sender and 16 | message receiver code within a single hosting application, even though these 17 | roles are often spread across applications, services, or at least across 18 | independently deployed and run tiers of applications or services. For clarity, 19 | the send and receive activities are kept as separate as if they were different 20 | apps and share no API object instances. 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/Client/RequestReplySender.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/Client/RequestReplySender.cs -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/Server/RequestReplyResponder.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/Server/RequestReplyResponder.cs -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/bins/RequestResponseSampleClient.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/bins/RequestResponseSampleServer.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/QueuesRequestResponse/bins/SampleManager.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ReceiveLoop/README.md: -------------------------------------------------------------------------------- 1 | # Receive Loop 2 | 3 | This sample shows how to implement an explicit receive loop using the 4 | ```MessageReceiver``` client, instead of the callback-based model that 5 | ```QueueClient```and ```SubscriptionClient``` provide. Most application should 6 | use the callback-based programming model. 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | 11 | ## Sample Code 12 | 13 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 14 | 15 | To keep things reasonably simple, the sample program keeps message sender and 16 | message receiver code within a single hosting application, even though these 17 | roles are often spread across applications, services, or at least across 18 | independently deployed and run tiers of applications or services. For clarity, 19 | the send and receive activities are kept as separate as if they were different 20 | apps and share no API object instances. 21 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ReceiveLoop/ReceiveLoop.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/RoleBasedAccessControl/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/RoleBasedAccessControl/README.md: -------------------------------------------------------------------------------- 1 | # Role based access sample 2 | 3 | For more information about Role based access (RBAC), follow [this link](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-role-based-access-control). -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/RoleBasedAccessControl/RoleBasedAccessControl.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp3.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ScheduledMessages/README.md: -------------------------------------------------------------------------------- 1 | #Scheduled Messages sample 2 | 3 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/ScheduledMessages/ScheduledMessages.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/SendersReceiversWithQueues/SendersReceiversWithQueues.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/SendersReceiversWithTopics/SendersReceiversWithTopics.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/SessionState/README.md: -------------------------------------------------------------------------------- 1 | # Session State 2 | 3 | This sample illustrates the Session state handling feature of Azure Service Bus. 4 | 5 | Session state allows keeping track of the processing state a handler has related 6 | to a session, so that clients can be agile between processing nodes (including 7 | failover) during session processing. 8 | 9 | [Read more about sessions in the documentation][1] 10 | 11 | Refer to the main [README](../README.md) document for setup instructions. 12 | 13 | ## Sample Code 14 | 15 | This sample combines the Deferral and Session features such that the session state 16 | facility is being used to keep track of the procesing state of a workflow where 17 | input for the respective steps arrives out of the expected order. 18 | 19 | While sessions assure ordered delivery in the exact enqueue order, they 20 | obviously can't detect when messages are intentionally sent in an order other 21 | than expected by the receiver. 22 | 23 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 24 | 25 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/message-sessions -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/SessionState/SessionState.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/Sessions/Sessions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TimeToLive/TimeToLive.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TopicFilters/Order.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | //---------------------------------------------------------------- 4 | 5 | namespace TopicFilters 6 | { 7 | class Order 8 | { 9 | public string Color 10 | { 11 | get; 12 | set; 13 | } 14 | 15 | public int Quantity 16 | { 17 | get; 18 | set; 19 | } 20 | 21 | public string Priority 22 | { 23 | get; 24 | set; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TopicFilters/TopicFilters.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TopicsGettingStarted/README.md: -------------------------------------------------------------------------------- 1 | # Message Senders and Receivers with Service Bus Topics 2 | 3 | This sample shows interacting with Service Bus topics using the MessageReceiver 4 | and MessageSender classes. 5 | 6 | Refer to the main [README](../README.md) document for setup instructions. 7 | 8 | ## Sample Code 9 | 10 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 11 | 12 | To keep things reasonably simple, the sample program keeps message sender and 13 | message receiver code within a single hosting application, even though these 14 | roles are often spread across applications, services, or at least across 15 | independently deployed and run tiers of applications or services. For clarity, 16 | the send and receive activities are kept as separate as if they were different 17 | apps and share no API object instances. 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TopicsGettingStarted/TopicsGettingStarted.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TransactionsAndSendVia/TransactionsAndSendVia/AMQPTransactionsSendVia/Message.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace TransactionsAndSendVia 6 | { 7 | class MyMessage 8 | { 9 | public string Name { get; set; } 10 | public string Address { get; set; } 11 | public string ZipCode { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TransactionsAndSendVia/TransactionsAndSendVia/AMQPTransactionsSendVia/MessageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.Azure.ServiceBus; 5 | using Newtonsoft.Json; 6 | 7 | 8 | 9 | namespace TransactionsAndSendVia 10 | { 11 | public static class MessageHelper 12 | { 13 | public static T DeserializeMsg(this Message message) where T : class 14 | { 15 | return JsonConvert.DeserializeObject(Encoding.UTF8.GetString(message.Body)); 16 | } 17 | public static Message AsMessage(this object obj) 18 | { 19 | return new Message(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(obj))); 20 | } 21 | 22 | public static byte[] AsBody(this object obj) 23 | { 24 | return Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(obj)); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/TransactionsAndSendVia/TransactionsAndSendVia/AMQPTransactionsSendVia/TransactionsAndSendVia.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/messaging-samples.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: 'Azure Service Bus .NET Standard samples' 4 | description: 'Official set of .NET Standard samples for the Azure Service Bus service.' 5 | generateZip: true 6 | author: celemensv 7 | readme: README.md 8 | languages: 9 | - csharp 10 | technologies: 11 | - service-bus 12 | - service-bus-messaging 13 | - azure 14 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/scripts/azuredeploy.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "serviceBusNamespaceName": { 6 | "value": "GEN-UNIQUE" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/scripts/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemDisplayName": "Create a Service Bus Namespace and Queue", 3 | "description": "This template creates a Service Bus Namespace and Queue.", 4 | "summary": "This template creates a Service Bus Namespace and Queue.", 5 | "githubUsername": "clemensv", 6 | "dateUpdated": "2017-09-20" 7 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.Azure.ServiceBus/scripts/setupenv.ps1: -------------------------------------------------------------------------------- 1 | param ( 2 | [Parameter(Mandatory=$true)][string]$resourceGroup, 3 | [Parameter(Mandatory=$true)][string]$namespaceName, 4 | [string]$ruleName="SendListen" 5 | ) 6 | 7 | $env:SB_SAMPLES_CONNECTIONSTRING=(Get-AzureRmServiceBusKey -ResourceGroupName $resourceGroup -Namespace $namespaceName -Name $rulename).PrimaryConnectionString 8 | $env:SB_SAMPLES_QUEUENAME="BasicQueue" 9 | $env:SB_SAMPLES_TOPICNAME="BasicTopic" 10 | $env:SB_SAMPLES_SUBSCRIPTIONNAME="Subscription1" 11 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "build", 8 | "type": "process", 9 | "command": "msbuild", 10 | "args": [ 11 | // Ask msbuild to generate full paths for file names. 12 | "/property:GenerateFullPaths=true", 13 | "/t:build" 14 | ], 15 | "group": "build", 16 | "presentation": { 17 | // Reveal the output only if unrecognized errors occur. 18 | "reveal": "silent" 19 | }, 20 | // Use the standard MS compiler pattern to detect errors, warnings and infos 21 | "problemMatcher": "$msCompile" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/AtomicTransactions/AtomicTransactions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/AutoForward/AutoForward.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/DeadletterQueue/DeadletterQueue.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/Deferral/Deferral.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/DuplicateDetection/DuplicateDetection.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | MessagingSamples 6 | DuplicateDetection 7 | net462 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/DurableSender/Client/DurableSenderClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/DurableSender/DurableSenderLibrary/DurableSenderLibrary.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net462 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/SBGeoDR2/SBGeoDR2/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/SBGeoDR2/SBGeoDR2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/SBGeoDR2/SBGeoDR2/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/SBGeoDR2/SBGeoDR_existing_namespace_name/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/SBGeoDR2/SBGeoDR_existing_namespace_name/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/SBGeoDR2/SBGeoDR_existing_namespace_name/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/TestGeoDR/ConsoleApp1/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoDR/TestGeoDR/ConsoleApp1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoReplication/README.md: -------------------------------------------------------------------------------- 1 | # Geo-Replicated Senders -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoReplication/Receiver/GeoReceiver.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoReplication/SenderActiveReplication/SenderActiveReplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/GeoReplication/SenderPassiveReplication/SenderPassiveReplication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ManagedServiceIdentity/ManagedServiceIdentityWebApp/StyleSheet.css: -------------------------------------------------------------------------------- 1 | label { 2 | width: 200px; 3 | display: inline-block; 4 | } 5 | 6 | text { 7 | width: 300px; 8 | display: block; 9 | } 10 | 11 | input[type="submit"] { 12 | width: 75px; 13 | } 14 | 15 | input[type="text"] { 16 | width: 400px; 17 | } 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ManagedServiceIdentity/ManagedServiceIdentityWebApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ManagedServiceIdentity/README.md: -------------------------------------------------------------------------------- 1 | # Managed Service Identity sample # 2 | 3 | For more information about Managed Service Identity (MSI), follow [this link](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-managed-service-identity). -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/MessageBrowse/MessageBrowse.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/MessageBrowse/README.md: -------------------------------------------------------------------------------- 1 | # Message Browsing (Peek) 2 | 3 | This sample shows how to enumerate messages residing in a Queue or Topic 4 | subscription without locking and/or deleting them. This feature is typically 5 | used for diagnostic and troubleshooting purposes and/or for tooling built on top 6 | of Service Bus. 7 | 8 | [Read more about message browsing in the documentation.][1] 9 | 10 | Refer to the main [README](../README.md) document for setup instructions. 11 | 12 | ## Sample Code 13 | 14 | The sample sends a set of messages into a queue and then enumerates them. When 15 | you run the sample repeatedly, you will see that messages accumulate in the log 16 | as we don't receive and remove them. 17 | 18 | You will also observe that expired messages (we send with a 2 minute 19 | time-to-live setting) may hang around past their expiration time, because 20 | Service Bus lazily cleans up expired messages no longer available for regular 21 | retrieval. 22 | 23 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 24 | 25 | 26 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/message-browsing -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/MessageSender/MessageSender.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingBinding/Client/NetMessagingBindingClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingBinding/Service/IOnewayServiceContract.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingBinding/Service/IOnewayServiceContract.cs -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingBinding/Service/NetMessagingBindingService.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingBinding/ServiceDiagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingBinding/ServiceDiagram.jpg -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingSession/Client/NetMessagingSessionClient.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingSession/OrderService/NetMessagingSessionService.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingSession/ServiceDiagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/NetMessagingSession/ServiceDiagram.jpg -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PartitionedQueues/PartitionedQueues.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PartitionedQueues/README.md: -------------------------------------------------------------------------------- 1 | # Partitioned Queues 2 | 3 | This sample illustrates the specifics of partitioned queues. Service Bus creates 4 | "partitioned" queues by default, which means that the queue log is distributed across 5 | multiple storage backends for minimizing availability risks. This behavior has impact on 6 | the order in which messages will be retrieved, and it also has impact on the sequence 7 | numbering scheme. This sample illustrates this. 8 | 9 | [Read more on partitioning in the documentation][1]. 10 | 11 | Refer to the main [README](../README.md) document for setup instructions. 12 | 13 | ## Sample Code 14 | 15 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 16 | 17 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/PerformanceCounterSetup/ServiceConfiguration.Cloud.cscfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/PerformanceCounterSetup/ServiceConfiguration.Local.cscfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/PerformanceCounterSetup/ServiceDefinition.csdef: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/ServiceBusPerfCounters/ServiceConfiguration.Cloud.cscfg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/ServiceBusPerfCounters/ServiceConfiguration.Local.cscfg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/ServiceBusPerfCounters/ServiceDefinition.csdef: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/Performance/Microsoft.ServiceBus.MessagingPerformanceCounters.man: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/Performance/Microsoft.ServiceBus.MessagingPerformanceCounters.man -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/RegisterMessagingPerfCounter.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | set currentDir=%CD% 3 | echo Unregistering Microsoft.ServiceBus.MessagingPerformanceCounters.man 4 | "%WinDir%\System32\unlodctr.exe" /m:Performance\Microsoft.ServiceBus.MessagingPerformanceCounters.man 5 | 6 | echo Registering Microsoft.ServiceBus.MessagingPerformanceCounters.man 7 | "%WinDir%\System32\lodctr.exe" /M:Performance\Microsoft.ServiceBus.MessagingPerformanceCounters.man "%CD%" 8 | IF %ERRORLEVEL% NEQ 0 ( 9 | echo 10 | echo Registration failed. error level is %ERRORLEVEL% 11 | echo %ERRORLEVEL% 12 | exit /b %ERRORLEVEL% 13 | ) -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/Tracing/Microsoft.ServiceBus.EventDefinitions.man: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/Tracing/Microsoft.ServiceBus.EventDefinitions.man -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/WorkerRole.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/PerformanceCounters/WorkerRole1/WorkerRole.cs -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/Prefetch/Prefetch.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/Prefetch/readme.md: -------------------------------------------------------------------------------- 1 | # Prefetch 2 | This sample illustrates the the "prefetch" feature of the Service Bus client. 3 | 4 | The sample is specifically crafted to demonstrate the throughput difference 5 | between receiving messages with prefetch turned on and prefetch turned off. The 6 | default setting is for prefetch to be turned off. 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | [Read more about the prefetch feature in the documentation.][1] 11 | 12 | ## Sample Code 13 | 14 | The sample performs two send and receive sequences, once with prefetch turned on 15 | and once with prefetch turned off. You will observe that the variant with 16 | prefetch turned on yields higher throughput, and therefore a shorter execution 17 | time. 18 | 19 | The sample is further documented inline in the [Program.cs](Program.cs) C# file. 20 | 21 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-prefetch -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PrioritySubscriptions/PrioritySubscriptions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/PrioritySubscriptions/README.md: -------------------------------------------------------------------------------- 1 | # Priority Subscriptions 2 | 3 | This sample illustrates how do use topic subscriptions and filters for splitting 4 | up a message streams into multiple distinct streams based on certain conditions. 5 | 6 | The concrete example use-case shown here is prioritization, where we split the 7 | message stream into three distinct streams, with processing priorities 1 and 2 8 | having their own subscriptions, and priorities 3 and below having a shared 9 | subscription. Splitting up the message stream for routing to particular 10 | consumers for any other reason will look quite similar. 11 | 12 | ## Prerequisites and Setup 13 | 14 | Refer to the main [README](../README.md) document for setup instructions. 15 | 16 | ## Sample Code 17 | 18 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesGettingStarted/QueuesGettingStarted.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesGettingStarted/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Service Bus Queues 2 | 3 | This sample shows the essential API elements for interacting with messages and a 4 | Service Bus Queue. 5 | 6 | You will learn how to establish a connection, and to send and receive messages, 7 | and you will learn about the most important properties of Service Bus messages. 8 | 9 | Refer to the main [README](../README.md) document for setup instructions. 10 | 11 | ## Sample Code 12 | 13 | The sample is documented inline in the [program.cs](program.cs) C# file. 14 | 15 | To keep things reasonably simple, the sample program keeps message sender and 16 | message receiver code within a single hosting application, even though these 17 | roles are often spread across applications, services, or at least across 18 | independently deployed and run tiers of applications or services. For clarity, 19 | the send and receive activities are kept as separate as if they were different 20 | apps and share no API object instances. 21 | 22 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/Client/RequestReplySender.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/Client/RequestReplySender.cs -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/Server/RequestReplyResponder.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/Server/RequestReplyResponder.cs -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/bins/RequestResponseSampleClient.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/bins/RequestResponseSampleServer.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/QueuesRequestResponse/bins/SampleManager.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ReceiveLoop/README.md: -------------------------------------------------------------------------------- 1 | # Receive Loop 2 | 3 | This sample shows how to implement an explicit receive loop using the 4 | ```MessageReceiver``` client, instead of the callback-based model that 5 | ```QueueClient```and ```SubscriptionClient``` provide. Most application should 6 | use the callback-based programming model. 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | 11 | ## Sample Code 12 | 13 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 14 | 15 | To keep things reasonably simple, the sample program keeps message sender and 16 | message receiver code within a single hosting application, even though these 17 | roles are often spread across applications, services, or at least across 18 | independently deployed and run tiers of applications or services. For clarity, 19 | the send and receive activities are kept as separate as if they were different 20 | apps and share no API object instances. 21 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ReceiveLoop/ReceiveLoop.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/RoleBasedAccessControl/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/RoleBasedAccessControl/README.md: -------------------------------------------------------------------------------- 1 | # Role based access sample 2 | 3 | For more information about Role based access (RBAC), follow [this link](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-role-based-access-control). -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/RoleBasedAccessControl/RoleBasedAccessControl.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ScheduledMessages/README.md: -------------------------------------------------------------------------------- 1 | #Scheduled Messages sample 2 | 3 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ScheduledMessages/ScheduledMessages.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/SendersReceiversWithQueues/SendersReceiversWithQueues.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/SendersReceiversWithTopics/SendersReceiversWithTopics.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ServiceBusEventGridIntegration/SBEventGridIntegration/SBEventGridIntegration.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net461 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | PreserveNewest 19 | Never 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/ServiceBusEventGridIntegration/SBEventGridIntegration/host.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/SessionState/README.md: -------------------------------------------------------------------------------- 1 | # Session State 2 | 3 | This sample illustrates the Session state handling feature of Azure Service Bus. 4 | 5 | Session state allows keeping track of the processing state a handler has related 6 | to a session, so that clients can be agile between processing nodes (including 7 | failover) during session processing. 8 | 9 | [Read more about sessions in the documentation][1] 10 | 11 | Refer to the main [README](../README.md) document for setup instructions. 12 | 13 | ## Sample Code 14 | 15 | This sample combines the Deferral and Session features such that the session state 16 | facility is being used to keep track of the procesing state of a workflow where 17 | input for the respective steps arrives out of the expected order. 18 | 19 | While sessions assure ordered delivery in the exact enqueue order, they 20 | obviously can't detect when messages are intentionally sent in an order other 21 | than expected by the receiver. 22 | 23 | The sample is documented inline in the [Program.cs](Program.cs) C# file. 24 | 25 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/message-sessions -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/SessionState/SessionState.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/Sessions/Sessions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/TimeToLive/TimeToLive.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/TopicFilters/Order.cs: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------- 2 | // Copyright (c) Microsoft Corporation. All rights reserved. 3 | //---------------------------------------------------------------- 4 | 5 | namespace TopicFilters 6 | { 7 | class Order 8 | { 9 | public string Color 10 | { 11 | get; 12 | set; 13 | } 14 | 15 | public int Quantity 16 | { 17 | get; 18 | set; 19 | } 20 | 21 | public string Priority 22 | { 23 | get; 24 | set; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/TopicFilters/TopicFilters.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/TopicsGettingStarted/README.md: -------------------------------------------------------------------------------- 1 | # Message Senders and Receivers with Service Bus Topics 2 | 3 | This sample shows interacting with Service Bus topiscs using the MessageReceiver 4 | and MessageSender classes. 5 | 6 | Refer to the main [README](../README.md) document for setup instructions. 7 | 8 | ## Sample Code 9 | 10 | The sample is documented inline in the [program.cs](program.cs) C# file. 11 | 12 | To keep things reasonably simple, the sample program keeps message sender and 13 | message receiver code within a single hosting application, even though these 14 | roles are often spread across applications, services, or at least across 15 | independently deployed and run tiers of applications or services. For clarity, 16 | the send and receive activities are kept as separate as if they were different 17 | apps and share no API object instances. 18 | 19 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/TopicsGettingStarted/TopicsGettingStarted.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/scripts/azuredeploy.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "serviceBusNamespaceName": { 6 | "value": "GEN-UNIQUE" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/scripts/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemDisplayName": "Create a Service Bus Namespace and Queue", 3 | "description": "This template creates a Service Bus Namespace and Queue.", 4 | "summary": "This template creates a Service Bus Namespace and Queue.", 5 | "githubUsername": "clemensv", 6 | "dateUpdated": "2017-09-20" 7 | } -------------------------------------------------------------------------------- /samples/DotNet/Microsoft.ServiceBus.Messaging/scripts/sampleenv.ps1: -------------------------------------------------------------------------------- 1 | param ( 2 | [Parameter(Mandatory=$true)][string]$resourceGroup, 3 | [Parameter(Mandatory=$true)][string]$namespaceName, 4 | [string]$ruleName="SendListen" 5 | ) 6 | 7 | $env:SB_SAMPLES_CONNECTIONSTRING=(Get-AzureRmServiceBusKey -ResourceGroupName $resourceGroup -Namespace $namespaceName -Name $rulename).PrimaryConnectionString 8 | $env:SB_SAMPLES_MANAGE_CONNECTIONSTRING=(Get-AzureRmServiceBusKey -ResourceGroupName $resourceGroup -Namespace $namespaceName -Name "RootManageSharedAccessKey").PrimaryConnectionString 9 | $env:SB_SAMPLES_QUEUENAME="BasicQueue" 10 | $env:SB_SAMPLES_TOPICNAME="BasicTopic" 11 | $env:SB_SAMPLES_SUBSCRIPTIONNAME="Subscription1" 12 | -------------------------------------------------------------------------------- /samples/Java/.gitignore: -------------------------------------------------------------------------------- 1 | sampleenv.bat 2 | 3 | -------------------------------------------------------------------------------- /samples/Java/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/Java/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "type": "shell", 9 | "command": "mvn -B verify", 10 | "group": "build" 11 | }, 12 | { 13 | "taskName": "test", 14 | "type": "shell", 15 | "command": "mvn -B test", 16 | "group": "test" 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/AutoForward/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/AutoForward/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/AutoForward/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/AutoForward/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/AutoForward/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/AutoForward/src/test/java/com/microsoft/azure/servicebus/samples/autoforward/AutoForwardTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.autoforward; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | public class AutoForwardTest { 7 | 8 | @Test 9 | public void run() throws Exception { 10 | Assert.assertEquals(0, 11 | AutoForward.runApp(new String[0], (connectionString) -> { 12 | AutoForward app = new AutoForward(); 13 | try { 14 | app.run(connectionString); 15 | return 0; 16 | } catch (Exception e) { 17 | System.out.printf("%s", e.toString()); 18 | return 1; 19 | } 20 | })); 21 | } 22 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DeadletterQueue/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DeadletterQueue/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DeadletterQueue/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DeadletterQueue/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DeadletterQueue/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DeadletterQueue/src/test/java/com/microsoft/azure/servicebus/samples/deadletterqueue/DeadletterQueueTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.deadletterqueue; 2 | 3 | import org.junit.Assert; 4 | 5 | public class DeadletterQueueTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | DeadletterQueue.runApp(new String[0], (connectionString) -> { 10 | DeadletterQueue app = new DeadletterQueue(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DuplicateDetection/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DuplicateDetection/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DuplicateDetection/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DuplicateDetection/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DuplicateDetection/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/DuplicateDetection/src/test/java/com/microsoft/azure/servicebus/samples/duplicatedetection/DuplicateDetectionTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.duplicatedetection; 2 | 3 | 4 | import org.junit.Assert; 5 | 6 | public class DuplicateDetectionTest { 7 | @org.junit.Test 8 | public void runApp() throws Exception { 9 | Assert.assertEquals(0, 10 | DuplicateDetection.runApp(new String[0], (connectionString) -> { 11 | DuplicateDetection app = new DuplicateDetection(); 12 | try { 13 | app.run(connectionString); 14 | return 0; 15 | } catch (Exception e) { 16 | System.out.printf("%s", e.toString()); 17 | return 1; 18 | } 19 | })); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ManagingEntity/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "type": "java", 5 | "name": "CodeLens (Launch) - ManagingEntity", 6 | "request": "launch", 7 | "cwd": "${workspaceFolder}", 8 | "console": "internalConsole", 9 | "stopOnEntry": false, 10 | "mainClass": "com.microsoft.azure.servicebus.samples.managingentity.ManagingEntity", 11 | "args": "", 12 | "projectName": "managingentity" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ManagingEntity/readme.md: -------------------------------------------------------------------------------- 1 | # Managing Azure Service Bus Queues 2 | 3 | This sample shows the essential API elements for managing a 4 | Service Bus Queue. Topics and Subscriptions can be managed similarly. 5 | 6 | You will learn how to create a new queue, retrieve/get an existing queue, 7 | update an existing queue, or delete the queue. 8 | 9 | You will also learn about manipulating properties of the queue 10 | so as to optimize to your scenario. 11 | 12 | Refer to the main [README](../README.md) document for setup instructions. 13 | 14 | ## Sample Code 15 | 16 | The sample is documented inline in the [ManagingEntity.java](./src/main/java/com/microsoft/azure/servicebus/samples/managingentity/ManagingEntity.java) file. 17 | 18 | This sample creates a new Queue, retrieves the same, updates few properties and finally deletes it. 19 | We also retrieve the runtime information of the queue which shows the current status on 20 | number of messages, size of the queue, last accessed / updated time etc. 21 | It also shows details on how the messages are spread between 22 | active messages and deadlettered / scheduled messages. 23 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ManagingEntity/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ManagingEntity/src/test/java/com/microsoft/azure/servicebus/samples/managingentity/ManagingEntityTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.managingentity; 2 | 3 | import org.junit.Assert; 4 | 5 | public class ManagingEntityTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | ManagingEntity.runApp(new String[0], (connectionString) -> { 10 | ManagingEntity app = new ManagingEntity(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/MessageBrowse/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/MessageBrowse/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/MessageBrowse/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/MessageBrowse/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/MessageBrowse/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/MessageBrowse/src/test/java/com/microsoft/azure/servicebus/samples/messagebrowse/MessageBrowseTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.messagebrowse; 2 | 3 | import org.junit.Assert; 4 | 5 | public class MessageBrowseTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | MessageBrowse.runApp(new String[0], (connectionString) -> { 10 | MessageBrowse app = new MessageBrowse(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/readme.md: -------------------------------------------------------------------------------- 1 | # Partitioned Queues 2 | 3 | This sample illustrates the specifics of partitioned queues. Service Bus creates 4 | "partitioned" queues by default, which means that the queue log is distributed across 5 | multiple storage backends for minimizing availability risks. This behavior has impact on 6 | the order in which messages will be retrieved, and it also has impact on the sequence 7 | numbering scheme. This sample illustrates this. 8 | 9 | [Read more on partitioning in the documentation][1]. 10 | 11 | Refer to the main [README](../README.md) document for setup instructions. 12 | 13 | ## Sample Code 14 | 15 | The sample is documented inline in the [PartitionedQueues.java](.\src\main\java\com\microsoft\azure\servicebus\samples\partitionedqueues\PartitionedQueues.java) file. 16 | 17 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/PartitionedQueues/src/test/java/com/microsoft/azure/servicebus/samples/partitionedqueues/PartitionedQueuesTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.partitionedqueues; 2 | 3 | import org.junit.Assert; 4 | 5 | public class PartitionedQueuesTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | PartitionedQueues.runApp(new String[0], (connectionString) -> { 10 | PartitionedQueues app = new PartitionedQueues(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/readme.md: -------------------------------------------------------------------------------- 1 | # Prefetch 2 | This sample illustrates the the "prefetch" feature of the Service Bus client. 3 | 4 | The sample is specifically crafted to demonstrate the throughput difference 5 | between receiving messages with prefetch turned on and prefetch turned off. The 6 | default setting is for prefetch to be turned off. 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | [Read more about the prefetch feature in the documentation.][1] 11 | 12 | ## Sample Code 13 | 14 | The sample performs two send and receive sequences, once with prefetch turned on 15 | and once with prefetch turned off. You will observe that the variant with 16 | prefetch turned on yields higher throughput, and therefore a shorter execution 17 | time. 18 | 19 | The sample is further documented inline in the [Prefetch.java](.\src\main\java\com\microsoft\azure\servicebus\samples\prefetch\Prefetch.java) file. 20 | 21 | [1]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-prefetch -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/Prefetch/src/test/java/com/microsoft/azure/servicebus/samples/prefetch/PrefetchTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.prefetch; 2 | 3 | import org.junit.Assert; 4 | 5 | public class PrefetchTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | Prefetch.runApp(new String[0], (connectionString) -> { 10 | Prefetch app = new Prefetch(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/readme.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Service Bus Queues 2 | 3 | This sample shows the essential API elements for interacting with messages and a 4 | Service Bus Queue. 5 | 6 | You will learn how to establish a connection, and to send and receive messages, 7 | and you will learn about the most important properties of Service Bus messages. 8 | 9 | Refer to the main [README](../README.md) document for setup instructions. 10 | 11 | ## Sample Code 12 | 13 | The sample is documented inline in the [QueuesGettingStarted.java](./src/main/java/com/microsoft/azure/servicebus/samples/queuesgettingstarted/QueuesGettingStarted.java) file. 14 | 15 | To keep things reasonably simple, the sample program keeps message sender and 16 | message receiver code within a single hosting application, even though these 17 | roles are often spread across applications, services, or at least across 18 | independently deployed and run tiers of applications or services. For clarity, 19 | the send and receive activities are kept as separate as if they were different 20 | apps and share no API object instances. 21 | 22 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesGettingStarted/src/test/java/com/microsoft/azure/servicebus/samples/queuesgettingstarted/QueuesGettingStartedTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.queuesgettingstarted; 2 | 3 | import org.junit.Assert; 4 | 5 | 6 | public class QueuesGettingStartedTest { 7 | @org.junit.Test 8 | public void runApp() throws Exception { 9 | Assert.assertEquals(0, 10 | QueuesGettingStarted.runApp(new String[0], (connectionString) -> { 11 | QueuesGettingStarted app = new QueuesGettingStarted(); 12 | try { 13 | app.run(connectionString); 14 | return 0; 15 | } catch (Exception e) { 16 | System.out.printf("%s", e.toString()); 17 | return 1; 18 | } 19 | })); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesWithProxy/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesWithProxy/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesWithProxy/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesWithProxy/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/QueuesWithProxy/src/test/java/com/microsoft/azure/servicebus/samples/queueswithproxy/QueuesWithProxyTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.queueswithproxy; 2 | 3 | import org.junit.Assert; 4 | 5 | 6 | public class QueuesWithProxyTest { 7 | @org.junit.Test 8 | public void runApp() throws Exception { 9 | Assert.assertEquals(0, 10 | QueuesWithProxy.runApp(new String[0], (connectionString) -> { 11 | QueuesWithProxy app = new QueuesWithProxy(); 12 | try { 13 | app.run(connectionString); 14 | return 0; 15 | } catch (Exception e) { 16 | System.out.printf("%s", e.toString()); 17 | return 1; 18 | } 19 | })); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/readme.md: -------------------------------------------------------------------------------- 1 | # Receive Loop 2 | 3 | This sample shows how to implement an explicit receive loop using the 4 | ```MessageReceiver``` client, instead of the callback-based model that 5 | ```QueueClient```and ```SubscriptionClient``` provide. Most application should 6 | use the callback-based programming model. 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | 11 | ## Sample Code 12 | 13 | The sample is documented inline in the [ReceiveLoop.java](./src/main/java/com/microsoft/azure/servicebus/samples/receiveloop/ReceiveLoop.java) file. 14 | 15 | To keep things reasonably simple, the sample program keeps message sender and 16 | message receiver code within a single hosting application, even though these 17 | roles are often spread across applications, services, or at least across 18 | independently deployed and run tiers of applications or services. For clarity, 19 | the send and receive activities are kept as separate as if they were different 20 | apps and share no API object instances. 21 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ReceiveLoop/src/test/java/com/microsoft/azure/servicebus/samples/receiveloop/ReceiveLoopTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.receiveloop; 2 | 3 | import org.junit.Assert; 4 | 5 | public class ReceiveLoopTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | ReceiveLoop.runApp(new String[0], (connectionString) -> { 10 | ReceiveLoop app = new ReceiveLoop(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/SasAuthorization/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "interactive" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/SasAuthorization/src/test/java/com/microsoft/azure/servicebus/samples/sasauthorization/SasAuthorizationTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.sasauthorization; 2 | 3 | import org.junit.Assert; 4 | 5 | public class SasAuthorizationTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | SasAuthorization.runApp(new String[0], (connectionString) -> { 10 | SasAuthorization app = new SasAuthorization(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/readme.md: -------------------------------------------------------------------------------- 1 | # Scheduled Messages 2 | 3 | This sample shows how to send messages into Service Bus that will be 4 | activates at a predetermined, later time. 5 | 6 | [Read more about scheduling in the documentation.][1] 7 | 8 | Refer to the main [README](../README.md) document for setup instructions. 9 | 10 | ## Sample Code 11 | 12 | The sample is documented inline in the [ScheduledMessages.java](.\src\main\java\com\microsoft\azure\servicebus\samples\scheduledmessages\ScheduledMessages.java) file. 13 | 14 | 15 | [1]: https://docs.microsoft.com/en-us/azure/service-bus-messaging/message-sequencing#scheduled-messages -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/ScheduledMessages/src/test/java/com/microsoft/azure/servicebus/samples/scheduledmessages/ScheduledMessagesTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.scheduledmessages; 2 | 3 | import org.junit.Assert; 4 | 5 | public class ScheduledMessagesTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | ScheduledMessages.runApp(new String[0], (connectionString) -> { 10 | ScheduledMessages app = new ScheduledMessages(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TimeToLive/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TimeToLive/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TimeToLive/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TimeToLive/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TimeToLive/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TimeToLive/src/test/java/com/microsoft/azure/servicebus/samples/timetolive/TimeToLiveTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.timetolive; 2 | 3 | import org.junit.Assert; 4 | 5 | public class TimeToLiveTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | TimeToLive.runApp(new String[0], (connectionString) -> { 10 | TimeToLive app = new TimeToLive(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-managingtopicrules 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Java Console App", 6 | "type": "java", 7 | "request": "launch", 8 | "stopOnEntry": true, 9 | "cwd": "${workspaceRoot}", 10 | "startupClass": "com.microsoft.azure.servicebus.samples.managingtopicrules.ManagingTopicRules", 11 | "externalConsole": true, 12 | "jdkPath": "${env:JAVA_HOME}/bin", 13 | "sourcePath": ["${workspaceRoot}/src/main/java"], // Indicates where your source (.java) files are 14 | "classpath": ["${workspaceRoot}/target/classes"], // Indicates the location of your .class files 15 | "preLaunchTask": "verify", 16 | "options": ["-jar","${workspaceRoot}/target/azure-servicebus-samples-managingtopicrules-1.0.0-jar-with-dependencies.jar"], // Additional options to pass to the java executable 17 | "args": [] // Command line arguments to pass to the startup class 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build" 11 | }, 12 | { 13 | "taskName": "build", 14 | "command": "mvn package", 15 | "type": "shell", 16 | "group": "build" 17 | }, 18 | { 19 | "taskName": "compile", 20 | "command": "mvn compile", 21 | "type": "shell", 22 | "group": "build" 23 | }, 24 | { 25 | "taskName": "test", 26 | "command": "mvn -B test", 27 | "type": "shell", 28 | "group": "test" 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/src/main/java/com/microsoft/azure/servicebus/samples/topicfilters/Order.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.topicfilters; 2 | 3 | public class Order { 4 | 5 | public Order() { 6 | } 7 | 8 | public Order(String color, int quantity, String priority) { 9 | this.color = color; 10 | this.quantity = quantity; 11 | this.priority = priority; 12 | } 13 | 14 | public String getColor() { 15 | return color; 16 | } 17 | 18 | public String getPriority() { 19 | return priority; 20 | } 21 | 22 | public void setPriority(String priority) { 23 | this.priority = priority; 24 | } 25 | 26 | public int getQuantity() { 27 | 28 | return quantity; 29 | } 30 | 31 | public void setQuantity(int quantity) { 32 | this.quantity = quantity; 33 | } 34 | 35 | public void setColor(String color) { 36 | this.color = color; 37 | } 38 | 39 | String color; 40 | int quantity; 41 | String priority; 42 | } 43 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | log4j.rootLogger=ERROR, stdout 4 | 5 | log4j.logger.org.apache.qpid.jms=ERROR 6 | 7 | # CONSOLE appender 8 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 9 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 10 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 11 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicFilters/src/test/java/com/microsoft/azure/servicebus/samples/topicfilters/TopicFiltersTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.topicfilters; 2 | 3 | import org.junit.Assert; 4 | 5 | public class TopicFiltersTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | TopicFilters.runApp(new String[0], (connectionString) -> { 10 | TopicFilters app = new TopicFilters(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-queueclientquickstart 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/readme.md: -------------------------------------------------------------------------------- 1 | # Message Senders and Receivers with Service Bus Topics 2 | 3 | This sample shows interacting with Service Bus topiscs using the MessageReceiver 4 | and MessageSender classes. 5 | 6 | Refer to the main [README](../README.md) document for setup instructions. 7 | 8 | ## Sample Code 9 | 10 | The sample is documented inline in the [Program.cs](Program.cs) file. 11 | 12 | To keep things reasonably simple, the sample program keeps message sender and 13 | message receiver code within a single hosting application, even though these 14 | roles are often spread across applications, services, or at least across 15 | independently deployed and run tiers of applications or services. For clarity, 16 | the send and receive activities are kept as separate as if they were different 17 | apps and share no API object instances. 18 | 19 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | log4j.rootLogger=ERROR, stdout 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/azure-servicebus/TopicsGettingStarted/src/test/java/com/microsoft/azure/servicebus/samples/topicsgettingstarted/TopicsGettingStartedTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.topicsgettingstarted; 2 | 3 | import org.junit.Assert; 4 | 5 | public class TopicsGettingStartedTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | TopicsGettingStarted.runApp(new String[0], (connectionString) -> { 10 | TopicsGettingStarted app = new TopicsGettingStarted(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/java-sample.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: Service Bus Premium Messaging .NET Performance Test 4 | description: The sample in this repo can be used to help benchmark Service Bus Premium Messaging throughput, and can be used to study performance best practices. 5 | generateZip: true 6 | author: celemensv 7 | readme: readme.md 8 | languages: 9 | - java 10 | technologies: 11 | - service-bus 12 | - service-bus-messaging 13 | - azure 14 | -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-javamessageservice 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Java Console App", 6 | "type": "java", 7 | "request": "launch", 8 | "stopOnEntry": true, 9 | "cwd": "${workspaceRoot}", 10 | "startupClass": "com.microsoft.azure.servicebus.samples.jmsqueuequickstart.JmsQueueQuickstart", 11 | "externalConsole": true, 12 | "jdkPath": "${env:JAVA_HOME}/bin", 13 | "sourcePath": ["${workspaceRoot}/src/main/java"], // Indicates where your source (.java) files are 14 | "classpath": ["${workspaceRoot}/target/classes"], // Indicates the location of your .class files 15 | "preLaunchTask": "verify", 16 | "options": ["-jar","${workspaceRoot}/target/azure-servicebus-samples-jmsqueuequickstart-1.0.0-jar-with-dependencies.jar"], // Additional options to pass to the java executable 17 | "args": [] // Command line arguments to pass to the startup class 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build" 11 | }, 12 | { 13 | "taskName": "build", 14 | "command": "mvn package", 15 | "type": "shell", 16 | "group": "build" 17 | }, 18 | { 19 | "taskName": "compile", 20 | "command": "mvn compile", 21 | "type": "shell", 22 | "group": "build" 23 | }, 24 | { 25 | "taskName": "test", 26 | "command": "mvn -B test", 27 | "type": "shell", 28 | "group": "test" 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | log4j.rootLogger=ERROR, stdout 4 | 5 | log4j.logger.org.apache.qpid.jms=ERROR 6 | 7 | # CONSOLE appender 8 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 9 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 10 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 11 | -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsQueueQuickstart/src/test/java/com/microsoft/azure/servicebus/samples/jmsqueuequickstart/JmsQueueQuickstartTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.jmsqueuequickstart; 2 | 3 | import org.junit.Assert; 4 | 5 | public class JmsQueueQuickstartTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | JmsQueueQuickstart.runApp(new String[0], (connectionString) -> { 10 | JmsQueueQuickstart app = new JmsQueueQuickstart(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | azure-servicebus-samples-javamessageservice 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/.vscode/javaconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "sourcePath": ["src"], 3 | "classPathFile": "classpath.txt", 4 | "outputDirectory": "target/classes" 5 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Java Console App", 6 | "type": "java", 7 | "request": "launch", 8 | "stopOnEntry": true, 9 | "cwd": "${workspaceRoot}", 10 | "startupClass": "com.microsoft.azure.servicebus.samples.jmstopicquickstart.JmsTopicQuickstart", 11 | "externalConsole": true, 12 | "jdkPath": "${env:JAVA_HOME}/bin", 13 | "sourcePath": ["${workspaceRoot}/src/main/java"], // Indicates where your source (.java) files are 14 | "classpath": ["${workspaceRoot}/target/classes"], // Indicates the location of your .class files 15 | "preLaunchTask": "verify", 16 | "options": ["-jar","${workspaceRoot}/target/azure-servicebus-samples-jmstopicquickstart-1.0.0-jar-with-dependencies.jar"], // Additional options to pass to the java executable 17 | "args": [] // Command line arguments to pass to the startup class 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "taskName": "verify", 8 | "command": "mvn -B verify", 9 | "type": "shell", 10 | "group": "build", 11 | "problemMatcher": [] 12 | }, 13 | { 14 | "taskName": "build", 15 | "command": "mvn package", 16 | "type": "shell", 17 | "group": "build" 18 | }, 19 | { 20 | "taskName": "compile", 21 | "command": "mvn compile", 22 | "type": "shell", 23 | "group": "build" 24 | }, 25 | { 26 | "taskName": "test", 27 | "command": "mvn -B test", 28 | "type": "shell", 29 | "group": "test" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=ERROR, stdout 2 | 3 | log4j.logger.org.apache.qpid.jms=ERROR 4 | 5 | # CONSOLE appender 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n 9 | -------------------------------------------------------------------------------- /samples/Java/qpid-jms-client/JmsTopicQuickstart/src/test/java/com/microsoft/azure/servicebus/samples/jmstopicquickstart/JmsTopicQuickstartTest.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.azure.servicebus.samples.jmstopicquickstart; 2 | 3 | import org.junit.Assert; 4 | 5 | public class JmsTopicQuickstartTest { 6 | @org.junit.Test 7 | public void runApp() throws Exception { 8 | Assert.assertEquals(0, 9 | JmsTopicQuickstart.runApp(new String[0], (connectionString) -> { 10 | JmsTopicQuickstart app = new JmsTopicQuickstart(); 11 | try { 12 | app.run(connectionString); 13 | return 0; 14 | } catch (Exception e) { 15 | System.out.printf("%s", e.toString()); 16 | return 1; 17 | } 18 | })); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /samples/Java/scripts/azuredeploy.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "serviceBusNamespaceName": { 6 | "value": "GEN-UNIQUE" 7 | }, 8 | "serviceBusQueueName": { 9 | "value": "GEN-UNIQUE" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/Java/scripts/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemDisplayName": "Create a Service Bus Namespace and Queue", 3 | "description": "This template creates a Service Bus Namespace and Queue.", 4 | "summary": "This template creates a Service Bus Namespace and Queue.", 5 | "githubUsername": "clemensv", 6 | "dateUpdated": "2017-09-20" 7 | } -------------------------------------------------------------------------------- /samples/Java/scripts/sampleenv.ps1: -------------------------------------------------------------------------------- 1 | param ( 2 | [Parameter(Mandatory=$true)][string]$resourceGroup, 3 | [Parameter(Mandatory=$true)][string]$namespaceName, 4 | [string]$ruleName="SendListen" 5 | ) 6 | 7 | $env:SB_SAMPLES_CONNECTIONSTRING=(Get-AzureRmServiceBusKey -ResourceGroupName $resourceGroup -Namespace $namespaceName -Name $rulename).PrimaryConnectionString 8 | $env:SB_SAMPLES_QUEUENAME="myqueue" 9 | $env:SB_SAMPLES_TOPICNAME="mytopic" 10 | $env:SB_SAMPLES_SUBSCRIPTIONNAME="mysub" 11 | -------------------------------------------------------------------------------- /samples/Management/CreateQueue/CreateQueue.ps1: -------------------------------------------------------------------------------- 1 | Login-AzureRmAccount 2 | 3 | Select-AzureRmSubscription -SubscriptionName "MyAzureSubName" 4 | Get-AzureRmContext 5 | 6 | # Create a resource group 7 | New-AzureRmResourceGroup –Name my-resourcegroup –Location westus2 8 | 9 | # Create a Messaging namespace 10 | New-AzureRmServiceBusNamespace -ResourceGroupName my-resourcegroup -NamespaceName namespace-name -Location westus2 11 | 12 | # Create a queue 13 | New-AzureRmServiceBusQueue -ResourceGroupName my-resourcegroup -NamespaceName namespace-name -Name queue-name -EnablePartitioning $False 14 | 15 | # Get primary connection string (required in next step) 16 | Get-AzureRmServiceBusKey -ResourceGroupName my-resourcegroup -Namespace namespace-name -Name RootManageSharedAccessKey 17 | 18 | # Delete the created resources if desired 19 | Remove-AzureRmResourceGroup -Name my-resourcegroup -------------------------------------------------------------------------------- /samples/Management/CreateQueue/CreateQueue.py: -------------------------------------------------------------------------------- 1 | az login 2 | 3 | az account set --subscription Azure_subscription_name 4 | 5 | # Create a resource group 6 | az group create --name my-resourcegroup --location eastus 7 | 8 | # Create a Messaging namespace 9 | az servicebus namespace create --name namespace-name --resource-group my-resourcegroup -l eastus2 10 | 11 | # Create a queue 12 | az servicebus queue create --resource-group my-resourcegroup --namespace-name namespace_name --name queue-name 13 | 14 | # Get the connection string 15 | az servicebus namespace authorization-rule keys list --resource-group my-resourcegroup --namespace-name namespace-name --name RootManageSharedAccessKey 16 | 17 | # Delete the created resources if desired 18 | az group delete --resource-group my-resourcegroup -------------------------------------------------------------------------------- /samples/Management/GeoDR/SBGeoDR2/SBGeoDR2/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/SBGeoDR2/SBGeoDR2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/SBGeoDR2/SBGeoDR2/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/SBGeoDR2/SBGeoDR_existing_namespace_name/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/SBGeoDR2/SBGeoDR_existing_namespace_name/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/SBGeoDR2/SBGeoDR_existing_namespace_name/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/TestGeoDR/ConsoleApp1/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/Management/GeoDR/TestGeoDR/ConsoleApp1/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | -------------------------------------------------------------------------------- /samples/Management/Metrics/AccessServiceBusMetricsViaCode/AccessServiceBusMetricsViaCode.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | latest 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /service-bus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-service-bus/c8859eed26944f54c8db3dfc5ad1c21f6fe9c8db/service-bus.png --------------------------------------------------------------------------------