Share via


PublishToAzureServiceBus@1 - Publish To Azure Service Bus v1 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 service connection.


messageBody - Message body
string.

Specifies the JSON messageBody.


signPayload - Sign the Message
boolean. Default value: false.

If set to true, a private certificate will be added to the message.


certificateString - Certificate Variable
string. Required when signPayload = true.

Specifies the secret variable that contains the certificate content. This can also be a certificate stored in an Azure key vault that is linked to a variable group used by the release pipeline.


signatureKey - Signature Property Key
string. Optional. Use when signPayload = true.

In Message Properties, specifies the key where the signature is. If left empty, the default value is signature.


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 an 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