Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JMeter sampler for Azure EventHubs #21

Open
stijnmoreels opened this issue Aug 28, 2024 · 3 comments
Open

Add JMeter sampler for Azure EventHubs #21

stijnmoreels opened this issue Aug 28, 2024 · 3 comments

Comments

@stijnmoreels
Copy link

stijnmoreels commented Aug 28, 2024

While most examples showcase HTTP load tests, other samplers are supported by JMeter as well. One that is especially useful to verify with load tests is Azure EventHubs.

https://github.com/pnopjp/jmeter-plugins?tab=readme-ov-file

Example:

 <jp.co.pnop.jmeter.protocol.azureeventhubs.sampler.AzEventHubsSampler guiclass="jp.co.pnop.jmeter.protocol.azureeventhubs.sampler.gui.AzEventHubsSamplerGui" testclass="jp.co.pnop.jmeter.protocol.azureeventhubs.sampler.AzEventHubsSampler" testname="Azure Event Hubs Sampler" enabled="true">
          <stringProp name="namespaceName">**********.servicebus.windows.net</stringProp>
          <stringProp name="authType">Shared access signature</stringProp>
          <stringProp name="sharedAccessKeyName">YourSharedAccessKey</stringProp>
          <stringProp name="sharedAccessKey">********************</stringProp>
          <stringProp name="eventHubName">youreventhubname</stringProp>
          <stringProp name="partitionType">Not specified</stringProp>
          <stringProp name="partitionValue"></stringProp>
          <elementProp name="messages" elementType="jp.co.pnop.jmeter.protocol.amqp.sampler.AzAmqpMessages" guiclass="jp.co.pnop.jmeter.protocol.amqp.sampler.gui.AzAmqpMessagesPanel" testclass="jp.co.pnop.jmeter.protocol.amqp.sampler.AzAmqpMessages" testname="[res_key=Azure Event Hubs Default]" enabled="true">
            <collectionProp name="Messages.messages">
              <elementProp name="SGVsbG8sIEF6dXJlIEV2ZW50IEh1YnMh" elementType="jp.co.pnop.jmeter.protocol.amqp.sampler.AzAmqpMessage">
                <stringProp name="Message.messageType">Base64 encoded binary</stringProp>
                <stringProp name="Message.message">SGVsbG8sIEF6dXJlIEV2ZW50IEh1YnMh</stringProp>
                <objProp>
                  <name>Message.systemProperties</name>
                  <value class="java.lang.String"></value>
                </objProp>
                <objProp>
                  <name>Message.appProperties</name>
                  <value class="java.lang.String"></value>
                </objProp>
              </elementProp>
              <elementProp name="Hello, Azure Event Hubs!" elementType="jp.co.pnop.jmeter.protocol.amqp.sampler.AzAmqpMessage">
                <stringProp name="Message.messageType">String</stringProp>
                <stringProp name="Message.message">Hello, Azure Event Hubs!</stringProp>
                <objProp>
                  <name>Message.systemProperties</name>
                  <value class="java.lang.String"></value>
                </objProp>
                <objProp>
                  <name>Message.appProperties</name>
                  <value class="java.lang.String"></value>
                </objProp>
              </elementProp>
              <elementProp name="/tmp/eventhubs-sample.gif" elementType="jp.co.pnop.jmeter.protocol.amqp.sampler.AzAmqpMessage">
                <stringProp name="Message.messageType">File</stringProp>
                <stringProp name="Message.message">/tmp/eventhubs-sample.gif</stringProp>
                <objProp>
                  <name>Message.systemProperties</name>
                  <value class="java.lang.String"></value>
                </objProp>
                <objProp>
                  <name>Message.appProperties</name>
                  <value class="java.lang.String"></value>
                </objProp>
              </elementProp>
            </collectionProp>
          </elementProp>
        </jp.co.pnop.jmeter.protocol.azureeventhubs.sampler.AzEventHubsSampler>
@rabelenda
Copy link
Contributor

Interesting, thank you to bring this up. Is that xml showcasing a real scenario as you use it? Is important for us to properly defined what are the most common used properties, which should be mandatory and which optional, as to provide the best API and simplify as much as we can the most common scenario.

@stijnmoreels
Copy link
Author

It's copied from the referenced repo. Not currently using it, but more wondering if Azure EventHubs should be included as we are currently thinking about writing load tests for it with Abstracta.

@rabelenda
Copy link
Contributor

I think it would be a nice contribution if anyone can implement it in the DSL so we can include it. For Abstracta it would take some time since not much people has requested such feature and seems to be quite domain specfiic. But if more people ask for this we can reconsider. One thing we have in the roadmap is to include some means to use any JMeter element in DSL test plans, as you can do with element() in java DSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants