![]() ![]() For instructions on how to get a Service Bus connection string, see:Ĭlient, err := azservicebus.NewClientFromConnectionString(connectionString, nil) For more information about Service Bus roles, see:Ĭlient, err := azservicebus.NewClient("", credential, nil) The service principal specified by the credential needs to be added to the appropriate Service Bus roles for your For more information about the DefaultAzureCredential, see:Ĭredential, err := azidentity.NewDefaultAzureCredential(nil) "/Azure/azure-sdk-for-go/sdk/messaging/azservicebus" The Service Bus Client can be created using a credential from the Azure Identity package, such as DefaultAzureCredential, or using a Service Bus connection string. Install the Azure Service Bus client module for Go with go get: go get /Azure/azure-sdk-for-go/sdk/messaging/azservicebus For example, create a Service Bus queue using the Azure portal, the Azure CLI, or other tools. A Service Bus queue, topic, or subscription - See the Azure Service Bus documentation to create an entity in your Service Bus namespace.Service Bus namespace - Create a namespace.Azure subscription - Create a free account.Go, version 1.18 or higher - Install Go.If you used the pre-release azure-service-bus-go module, see the Migration guide. Source code | API reference documentation | REST API documentation | Product documentation | Samples Receive messages from a Service Bus queue or subscription.Send messages to a Service Bus queue or topic.Use the Service Bus client module /Azure/azure-sdk-for-go/sdk/messaging/azservicebus in your application to: (sr) SetSessionState(ctx, state, options)Īzure Service Bus is a highly reliable cloud messaging service for providing real-time and fault-tolerant communication between distributed senders and receivers. (s) SendMessageBatch(ctx, batch, options) (s) SendAMQPAnnotatedMessage(ctx, message, options) (s) ScheduleMessages(ctx, messages, scheduledEnqueueTime, options) (s) ScheduleAMQPAnnotatedMessages(ctx, messages, scheduledEnqueueTime, options) (s) CancelScheduledMessages(ctx, sequenceNumbers, options) Type ScheduleAMQPAnnotatedMessagesOptions (r) ReceiveMessages(ctx, maxMessages, options) (r) ReceiveDeferredMessages(ctx, sequenceNumbers, options) (r) PeekMessages(ctx, maxMessageCount, options) (r) DeadLetterMessage(ctx, message, options) (r) CompleteMessage(ctx, message, options) (r) AbandonMessage(ctx, message, options) (client) NewSender(queueOrTopic, options) (client) NewReceiverForSubscription(topicName, subscriptionName, options) (client) NewReceiverForQueue(queueName, options) (client) AcceptSessionForSubscription(ctx, topicName, subscriptionName, sessionID, options) (client) AcceptSessionForQueue(ctx, queueName, sessionID, options) (client) AcceptNextSessionForSubscription(ctx, topicName, subscriptionName, options) (client) AcceptNextSessionForQueue(ctx, queueName, options) ![]() NewClientFromConnectionString(connectionString, options) NewClient(fullyQualifiedNamespace, credential, options)
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |