Description
Deletes the message in the Azure Service Bus queue using a SAS key name/value pair for authentication.
Note: This function is always used in conjunction with the function AzureServiceBusPeekLockMessage which processes the message before AzureServiceBusDeleteMessage
Signature
AzureServiceBusDeleteMessage( 'servicebusqueueurl', 'sas-key-name', 'sas-key-value', 'namespaceurl' )
Example 1: Service Bus Queue
The example below uses a SAS key name/value pair to find and process a message in a queue named 'n52bpa'. It is then deleted by AzureServiceBusDeleteMessage
SmartFlow( AzureServiceBusPeekLockMessage( 'https://n52bpa-sb-north52v2.servicebus.windows.net/n52bpa/messages/head', 'RootManageSharedAccessKey', 'HKutpMU25diCyJyl5X0BO5sYw8nfkx6gI1VyppEFAI22', 'https://n52bpa-sb-north52v2.servicebus.windows.net' ), Setvar('messageid', GetVarJsonValue('MessageId', '', GetVarHeaderValue('BrokerProperties')) ), Setvar('locktoken', GetVarJsonValue('LockToken', '', GetVarHeaderValue('BrokerProperties')) ), /*Do your processing steps here*/ AzureServiceBusDeleteMessage( 'https://n52bpa-sb-north52v2.servicebus.windows.net/n52bpa/messages/' + GetVar('messageid') + '/' + GetVar('locktoken'), 'RootManageSharedAccessKey', 'HKutpMU25diCyJyl5X0BO5sYw8nfkx6gI1VyppEFAI22', 'https://n52bpa-sb-north52v2.servicebus.windows.net' ) )
Example 2: ServiceBus Topic and Subscription
The example below uses a SAS key name/value pair to look at a message in a subscription 'sub1' of a topic named 'n52bpa'. It is then deleted by AzureServiceBusDeleteMessage.
SmartFlow( AzureServiceBusPeekLockMessage( 'https://north52.servicebus.windows.net/n52bpa/subscriptions/sub1/messages/head', 'RootManageSharedAccessKey', 'jXlZa***************i/UE2wJmDiLbYt6WLU=', 'https://north52.servicebus.windows.net/' ), Setvar('messageid', GetVarJsonValue('MessageId', '', GetVarHeaderValue('BrokerProperties')) ), Setvar('locktoken', GetVarJsonValue('LockToken', '', GetVarHeaderValue('BrokerProperties')) ), /*Do your processing steps here*/ AzureServiceBusDeleteMessage( 'https://north52.servicebus.windows.net/n52bpa/subscriptions/sub1/messages/' + GetVar('messageid') + '/' + GetVar('locktoken'), 'RootManageSharedAccessKey', 'jXlZa***************i/UE2wJmDiLbYt6WLU=', 'https://north52.servicebus.windows.net/' ) )
Parameters
Name | Type | Description | Required |
---|---|---|---|
fromdate | xxxx | xxxx | xxxx |
todate | xxxx | xxxx | xxxx |
interval | xxxx | xxxx | xxxx |
Notes: