Skip to content

Latest commit

 

History

History
135 lines (95 loc) · 10.3 KB

samplers.md

File metadata and controls

135 lines (95 loc) · 10.3 KB

Samplers

Azure Event Hubs

This sampler lets you send an AMQP request to an Azure Event Hubs.

Currently, this sampler does not support all Azure Event Hubs features. For example, send properties, etc are not supported.
I will prioritize the implementation of the ones that are most frequently requested by everyone.

Works with Apache JMeter™ v5.4.1 or later.

How to install

Download jmeter-plugins-azure-eventhubs.?.?.?.jar file from latest release and put it into lib/ext directory of JMeter (e.g. /usr/local/jmeter/lib/ext), then restart JMeter.

Parameters

Attribute Description Required
Name Descriptive name for this sampler that is shown in the tree No
Event Hubs Namespace Azure Event Hubs namespace name to send messages to.
(e.g. YOUREVENTHUBS.servicebus.windows.net)
Yes
Event Hub Event Hub name to send messages to. Yes
Partition Partition to send message to. You can select either Not specified, Partition Key, or Partition ID. No
Auth Type Authorization type to use when sending messages to Azure Event Hubs.
If you select "Microsoft Entra ID credential", also define the Microsoft Entra ID Credential Config Element.
Yes
Shared Access Policy *1 Shared access policy name of the Event Hubs namespace or Event Hub. No
Shared Access Key *1 Shared access keys for the shared access policy No
Variable Name of credential declared in Microsoft Entra ID Crednetial The variable name of the credential declared in Microsoft Entra ID Credential, specified if "Microsoft Entra ID credential" is selected for "Auth Type". No
Event data List of messages to be sent in batches. Select "String" to send a UTF-8 string, "Base64 encoded binary" to send a Base64 encoded binary, or "File" to send a file as binary. No

*1: Set these parameters only if "Shared access signature" is selected in Auth type.

Sample files

Tutorial

Azure Service Bus

This sampler lets you send an AMQP request to an Azure Service Bus.

Currently, this sampler does not support all Azure Service Bus features.
I will prioritize the implementation of the ones that are most frequently requested by everyone.

Works with Apache JMeter™ v5.4.1 or later.

How to install

Download jmeter-plugins-azure-servicebus.?.?.?.jar file from latest release and put it into lib/ext directory of JMeter (e.g. /usr/local/jmeter/lib/ext), then restart JMeter.

Parameters

Attribute Description Required
Name Descriptive name for this sampler that is shown in the tree No
Connection/Transaction Choose whether to create a new connection, use a previously created connection, or use a previously created transaction. Yes
Variable Name of Connection/Transaction Defined in Azure Service Bus Sampler Name of the previously defined Connection or Transaction, if "User Defined Connection" or "User Defined Transaction" was selected for Connection/Transaction. No
Service Bus Namespace *1 Azure Service Bus namespace name to send messages to.
(e.g. YOURSERVICEBUS.servicebus.windows.net)
Yes
Send messages to *1 Choose whether to send the messages to the "Queue" or to the "Topic". Yes
Queue name / Topic name *1 Queue/Topic name to send messages to. Yes
Protocol Protocol for sending messages Yes
Auth Type *1 Authorization type to use when sending messages to Azure Event Hubs.
If you select "Microsoft Entra ID credential", also define the Microsoft Entra ID Credential Config Element.
Yes
Shared Access Policy *1 *2 Shared access policy name of the Event Hubs namespace or Event Hub. No
Shared Access Key *1 *2 Shared access keys for the shared access policy No
Variable Name of credential declared in Microsoft Entra ID Crednetial *1 The variable name of the credential declared in Microsoft Entra ID Credential, specified, if "Microsoft Entra ID credential" is selected for "Auth Type". No
Create transaction before sending messages Create a transaction before sending a messages. No
Variable name for created transaction The name of the transaction to create, if "Create transaction before sending messages" is turned on. No
Transaction state Specify whether to commit or rollback, if "Use Defined Transaction" is selected for "Connection/Transaction".
  • [Continue transaction]
    No commit, and no rollback.
  • [Commit transaction after sending messages]
    Commits the specified transaction after sending the messages.
  • [Rollback transaction before sending messages]
    Sends the messages after the specified transaction is rolled back. (Sending messages are not included in the transaction)
No
Messages List of messages to be sent in batches. Select "String" to send a UTF-8 string, "Base64 encoded binary" to send a Base64 encoded binary, or "File" to send a file as binary.

To also send headers, standard properties and message atributes, fill in the "headers/properties/attributes" column in JSON format. There you can include the following as keys
  • "correlation-id" or "CorrelationId"
  • "reply-to" or "ReplyTo"
  • "reply-to-group-id" or "ReplyToSessionId"
  • "to"
  • "ttl" or "TimeToLive"
  • "x-opt-scheduled-enqueue-time" or "ScheduledEnqueueTime"
(e.g., {"reply-to": "foo@example.com", "ttl": "3 HOURS", "ScheduledEnqueueTime": "2022-08-03T10:15:30+01:00"})

To also send custom properties (user-defined properties), fill in the "custom properties" column in JSON format. (e.g., {"prop1": "value1", "prop2":2})
No

*1: If "Create New Connection" is selected for "Connection/Transaction", set these parameters.
*2: If "Shared access signature" is selected for Auth type, set these parameters.

Sample files

Tutorial

Azure Storage Queue

This sampler lets you send a request to an Azure Storage Queue.

Currently, this sampler does not support all Azure Storage Queue features. For example, update a message, etc are not supported.
I will prioritize the implementation of the ones that are most frequently requested by everyone.

Works with Apache JMeter™ v5.4.1 or later.

How to install

Download jmeter-plugins-azure-storage-queue.?.?.?.jar file from latest release and put it into lib/ext directory of JMeter (e.g. /usr/local/jmeter/lib/ext), then restart JMeter.

Parameters

Attribute Description Required
Name Descriptive name for this sampler that is shown in the tree No
Auth type Authorization type to use when sending messages to Azure Storage Queue.
If you select "Microsoft Entra ID credential", also define the Microsoft Entra ID Credential Config Element.
Yes
Connection string Connection string of the target Azure Storage, specified if "Auth type" is selected for "Connection string". No
Default Endpoints Protocol *1 Select the protocol from "http" or "https". No
Account Name *1 Target Azure storage account name. No
Storage Key *1 Storage key of the target Azure Storage. No
Endpoint Suffix *1 Usually, "core.windows.net" is specified. However, if your target is Azure Government, specify "core.usgovcloudapi.net", and if your target is Azure China, specify "core.chinacloudapi.cn". In this way, if a Storage Queue other than Azure Public is targeted, specify the appropriate suffix. No
Variable Name of credential declared in Microsoft Entra ID Crednetial *2 The variable name of the credential declared in Microsoft Entra ID Credential. No
Endpoint URL *2 *3 Endpoint URL of the target Azure Storage Queue. No
Queue name Queue name to send message to. Yes
SAS token *3 Shared access signature token string. It is sometimes called a "Query string". No
Message type To send a string or Base64 encoded binary string, select "String / Base64 encoded binary".
To send a file, select "File".
Yes
Message Enter the string or Base64 encoded binary string to be sent as a message, if "String / Base64 encoded binary" is selected for "Message type". No
Message filename Enter the filename to be sent as a message, if "FIle" is selected for "Message type". No
Visibility timeout (sec) The timeout period for how long the message is invisible in the queue. If unset the value will default to 0 and the message will be instantly visible. The timeout must be between 0 seconds and 604,800 seconds. No
Time to live (sec) How long the message will stay alive in the queue. If unset the value will default to 604,800 seconds, if "-1" is passed the message will not expire. The time to live must be "-1" or any positive number of seconds. No
Timeout (sec) Timeout applied to the operation. No

*1: If "Storage key" is selected for "Auth type", set these parameters.
*2: If "Azuer AD credential" is selected for "Auth type", set these parameters.
*3: If "Shared access signature" is selected for "Auth type", set these parameters.

Sample files