PublishToAzureServiceBus@0 - Publish To Azure Service Bus v0 task
Use this task to send a message to Azure Service Bus using a service connection (no agent required).
Inputs
azureSubscription
- Azure service bus connection
Input alias: connectedServiceName
. string
. Required.
Specifies an Azure Service Bus connection.
messageBody
- Message body
string
. Required. Default value: {"JobId": "$(system.jobId)", "PlanId": "$(system.planId)", "TimelineId": "$(system.timelineId)", "ProjectId": "$(system.teamProjectId)", "VstsUrl": "$(system.CollectionUri)","AuthToken": "$(system.AccessToken)"}
.
Specifies the JSON messageBody
.
waitForCompletion
- Wait for task completion
boolean
. Default value: false
.
If set to true
, this task will wait for the TaskCompleted event for the specified task timeout.
Task control options
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
Output variables
None.
Remarks
Use this task in an agentless job of a release pipeline to send a message to Azure Service Bus using a service connection (without using an agent).
Note
Can only be used in an agentless job of a release pipeline.
Where should a task signal completion?
To signal completion, the external service should POST completion data to the following pipelines REST endpoint.
{planUri}/{projectId}/_apis/distributedtask/hubs/{hubName}/plans/{planId}/events?api-version=2.0-preview.1
**Request Body**
{ "name": "TaskCompleted", "taskId": "taskInstanceId", "jobId": "jobId", "result": "succeeded" }
See this simple cmdline application for specifics.
In addition, a C# helper library is available to enable live logging and managing the task status for agentless tasks. Learn more about Async HTTP agentless tasks.
Requirements
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Server |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | All supported agent versions. |
Task category | Utility |