RabbitMQ Endpoint
Run RabbitMQ load and performance tests with LoadStrike using queues, exchanges, routing keys, and tracking IDs to observe downstream completion.
Matching docs
Search across docs titles, summaries, groups, and section headings.
Use Up and Down Arrow to move through results, then press Enter to open the active page.
No indexed docs matched that search. Try a broader term or open the docs hub.
What this page helps you do
What this page helps you do
Run RabbitMQ load and performance tests with LoadStrike using queues, exchanges, routing keys, and tracking IDs to observe downstream completion.
Who this is for
Teams defining the transport-specific source or destination side of a correlated transaction.
Prerequisites
- A stable tracking field shared between the producer side and the consumer or completion side
By the end
A transport definition that matches the transaction you need to measure.
Use this page when
Use this page when RabbitMQ Endpoint is the source or destination side of the transaction and you need the documented endpoint fields before wiring the scenario.
Visual guide
Guide
When To Use RabbitMQ
Use RabbitMQ as the source or destination of a tracked workflow, including an API request whose completion is emitted to RabbitMQ. Preserve the same business ID through the application and observe a completion queue after processing. A broker publisher confirm and a consumer delivery acknowledgement describe different hops; neither alone establishes the business outcome.
Isolate Queues And Compare Real Work
Use a dedicated test completion queue with the required exchange bindings rather than consuming the application worker queue. Keep routing keys, message size, queue configuration and application acknowledgement behavior consistent. Increase the load profile and compare achieved generation, completion latency, timeouts and duplicates. Inspect queue depth and broker resource use with RabbitMQ monitoring instead of assuming the endpoint collects those measurements.
Routing
Use queue names, routing keys, and exchanges to point LoadStrike at the correct RabbitMQ path. In produce mode, RabbitMQ requires queueName or routingKey, so exchange by itself is not enough.
Connection And Tracking
Connection settings tell LoadStrike how to reach the broker, and ClientProperties can carry extra metadata for tracing, tenancy, or environment tagging. TrackingField and optional GatherByField still use the same header or JSON selector rules as the other endpoints.
Consumer Observation And Errors
Native consumers observe messages for tracking in every supported SDK. With AutoAck disabled, acknowledgement errors are endpoint failures; they do not prove that a business operation failed. Check connection settings, queue permissions and processing failures before interpreting missing matches as application timeouts. Python supports synchronous and asynchronous endpoint delegates when application code supplies the transport.
Python Installation
Python native RabbitMQ endpoints require `pip install loadstrike[rabbitmq]`. Use `pip install loadstrike[all-transports]` when the same test project needs every optional transport client.
SDK And Plan Support
Native RabbitMQ endpoints are available in C#, Go, Java, Python, TypeScript, and JavaScript on Pro and above with a valid runner key. Supply your RabbitMQ deployment, credentials and the test queue or exchange routing configuration.
Endpoint definition samples
Use these samples to see how RabbitMQ Endpoint is represented as a source or destination endpoint before you attach it to a correlated scenario.
If you run these examples locally, add a valid runner key before execution starts. Set it with WithRunnerKey("...") or the config key LoadStrike:RunnerKey.
RabbitMQ Endpoint
using LoadStrike;
var tracking = new CrossPlatformTrackingConfiguration
{
Source = new HttpEndpointDefinition
{
Name = "orders-api",
Mode = TrafficEndpointMode.Produce,
TrackingField = TrackingFieldSelector.Parse("json:$.trackingId"),
Url = "https://api.example.com/orders",
Method = "POST",
MessagePayload = new { trackingId = "trk-1001", amount = 49.95m }
},
Destination = new RabbitMqEndpointDefinition
{
Name = "rabbit-out",
Mode = TrafficEndpointMode.Consume,
TrackingField = TrackingFieldSelector.Parse("json:$.trackingId"),
HostName = "localhost",
UserName = "guest",
Password = "guest",
QueueName = "orders.completed"
}
};
var scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.Empty("orders-http-to-rabbitmq"), tracking)
.WithLoadSimulations(LoadStrikeSimulation.Inject(10, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(20)));
LoadStrikeRunner.RegisterScenarios(scenario)
.WithRunnerKey("rkl_your_local_runner_key")
.Run();
package main
import loadstrike "loadstrike.com/sdk/go"
var rabbitMQEndpoint = &loadstrike.EndpointSpec{
Kind: "RabbitMq",
Name: "orders-queue",
Mode: "Consume",
TrackingField: "header:X-Correlation-Id",
RabbitMQ: &loadstrike.RabbitMQEndpointOptions{
HostName: "127.0.0.1",
Port: 5672,
UserName: "guest",
Password: "guest",
QueueName: "orders.completed",
AutoAck: false,
Durable: true,
},
}
import com.loadstrike.runtime.LoadStrikeCorrelation.TrackingFieldSelector;
import com.loadstrike.runtime.LoadStrikeTransports;
import com.loadstrike.runtime.RabbitMqEndpointDefinition;
import com.loadstrike.runtime.CrossPlatformScenarioConfigurator;
import com.loadstrike.runtime.CrossPlatformTrackingConfiguration;
import com.loadstrike.runtime.HttpEndpointDefinition;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeRunner;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeScenario;
import com.loadstrike.runtime.LoadStrikeRuntime.LoadStrikeSimulation;
var source = new HttpEndpointDefinition();
source.name = "orders-api";
source.mode = LoadStrikeTransports.TrafficEndpointMode.Produce;
source.trackingField = TrackingFieldSelector.parse("json:$.trackingId");
source.url = "https://api.example.com/orders";
source.method = "POST";
source.messagePayload = java.util.Map.of("trackingId", "trk-1001", "amount", 49.95);
var destination = new RabbitMqEndpointDefinition();
destination.name = "rabbit-out";
destination.mode = LoadStrikeTransports.TrafficEndpointMode.Consume;
destination.trackingField = TrackingFieldSelector.parse("json:$.trackingId");
destination.hostName = "localhost";
destination.userName = "guest";
destination.password = "guest";
destination.queueName = "orders.completed";
var tracking = new CrossPlatformTrackingConfiguration();
tracking.source = source;
tracking.destination = destination;
var scenario = CrossPlatformScenarioConfigurator.Configure(
LoadStrikeScenario.empty("orders-http-to-rabbitmq"),
tracking
).withLoadSimulations(LoadStrikeSimulation.inject(10, 1d, 20d));
LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
from loadstrike_sdk import CrossPlatformScenarioConfigurator, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation
tracking = {
"Source": {
"Kind": "Http",
"Name": "orders-api",
"Mode": "Produce",
"TrackingField": "json:$.trackingId",
"Url": "https://api.example.com/orders",
"Method": "POST",
"MessagePayload": {"trackingId": "trk-1001", "amount": 49.95},
},
"Destination": {
"Kind": "RabbitMq",
"Name": "rabbit-out",
"Mode": "Consume",
"TrackingField": "json:$.trackingId",
"HostName": "localhost",
"UserName": "guest",
"Password": "guest",
"QueueName": "orders.completed",
},
}
scenario = (
CrossPlatformScenarioConfigurator.Configure(
LoadStrikeScenario.empty("orders-http-to-rabbitmq"),
tracking,
)
.with_load_simulations(LoadStrikeSimulation.inject(10, 1, 20))
)
LoadStrikeRunner.register_scenarios(scenario) \
.with_runner_key("rkl_your_local_runner_key") \
.run()
import {
CrossPlatformScenarioConfigurator,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector
} from "@loadstrike/loadstrike-sdk";
const tracking = {
Source: {
Kind: "Http",
Name: "orders-api",
Mode: "Produce",
TrackingField: new TrackingFieldSelector("Json", "$.trackingId"),
Url: "https://api.example.com/orders",
Method: "POST",
MessagePayload: { trackingId: "trk-1001", amount: 49.95 }
},
Destination: {
Kind: "RabbitMq",
Name: "rabbit-out",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Json", "$.trackingId"),
HostName: "localhost",
UserName: "guest",
Password: "guest",
QueueName: "orders.completed"
}
};
const scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.empty("orders-http-to-rabbitmq"), tracking)
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
const {
CrossPlatformScenarioConfigurator,
LoadStrikeRunner,
LoadStrikeScenario,
LoadStrikeSimulation,
TrackingFieldSelector
} = require("@loadstrike/loadstrike-sdk");
(async () => {
const tracking = {
Source: {
Kind: "Http",
Name: "orders-api",
Mode: "Produce",
TrackingField: new TrackingFieldSelector("Json", "$.trackingId"),
Url: "https://api.example.com/orders",
Method: "POST",
MessagePayload: { trackingId: "trk-1001", amount: 49.95 }
},
Destination: {
Kind: "RabbitMq",
Name: "rabbit-out",
Mode: "Consume",
TrackingField: new TrackingFieldSelector("Json", "$.trackingId"),
HostName: "localhost",
UserName: "guest",
Password: "guest",
QueueName: "orders.completed"
}
};
const scenario = CrossPlatformScenarioConfigurator
.Configure(LoadStrikeScenario.empty("orders-http-to-rabbitmq"), tracking)
.withLoadSimulations(LoadStrikeSimulation.inject(10, 1, 20));
await LoadStrikeRunner
.registerScenarios(scenario)
.withRunnerKey("rkl_your_local_runner_key")
.run();
})();
RabbitMQ endpoint fields and parameters
| Parameter | Description |
|---|---|
Name
| Required endpoint identifier. It appears in correlation tables, sink exports, and troubleshooting messages, so choose a stable descriptive name. |
Mode
| Choose Produce when LoadStrike should create traffic, or Consume when it should listen for downstream traffic. Run mode validation checks that the selected mode matches the source or destination role. |
TrackingField
| Selector that extracts the correlation id from a header or JSON body. It is normally required, but can be omitted when UseLoadStrikeTraceIdHeader is true so LoadStrike uses header:loadstrike-trace-id for generated source traffic. Selector prefixes such as header: and json: are parsed case-insensitively, but the header name or JSON path segments after the prefix must match exact casing. The extracted value is matched case-sensitively by default unless TrackingFieldValueCaseSensitive is turned off on the tracking configuration. |
GatherByField
| Optional destination-only selector used for grouped correlation reports. It follows the same selector-casing rules as TrackingField. Group values are grouped case-sensitively by default unless GatherByFieldValueCaseSensitive is turned off on the tracking configuration. |
AutoGenerateTrackingIdWhenMissing
| Defaults to true. When the source payload does not already contain the tracked id, LoadStrike can inject one so the generated traffic still produces a correlation key. |
UseLoadStrikeTraceIdHeader
| Defaults to false. When true and TrackingField is omitted, produced source messages receive a loadstrike-trace-id header with a GUID value. Consume-mode source endpoints and CorrelateExistingTraffic runs do not inject this header; they only observe it if the existing traffic already contains it. |
PollInterval
| Controls how often a consumer-style endpoint polls for new messages. The value must stay greater than zero whenever you set it explicitly. |
MessageHeaders
| Optional headers that are written with produced traffic and also influence tracking extraction when the selector targets headers. Header names are preserved exactly as you set them, and header selectors later match using that same exact casing. |
MessagePayload
| Optional object or body value sent by producer-style endpoints. This is the payload your scenario is actually placing on the wire. |
MessagePayloadType
| Optional type hint used when JSON selectors need typed parsing. Leave it unset when dynamic JSON parsing is enough. |
JsonSettings / JsonConvertSettings
| Optional serializer settings for System.Text.Json or Newtonsoft.Json. Use them only when the payload shape or naming strategy requires custom parsing behavior. |
ContentType
| Optional explicit content type for custom payload handling. This is most helpful for delegate-style transports or non-default HTTP body shapes. |
HostName
| Required RabbitMQ host name. |
Port
| RabbitMQ port. Defaults to 5672 and must stay greater than zero. |
VirtualHost
| RabbitMQ virtual host. Defaults to /. |
UserName / Password
| Required credentials for the broker connection. Password can be empty, but it cannot be null. |
Exchange
| Optional exchange name for exchange-routed publishing. |
RoutingKey
| Producer routing key. For produce mode, either RoutingKey or QueueName must be supplied. |
QueueName
| Required for consume mode and also valid for direct queue publishing in produce mode. |
Durable
| Controls durable queue or exchange behavior for created broker entities when that applies. |
AutoAck
| Controls whether consumed messages are acknowledged automatically. |
UseSsl
| Enable this when the RabbitMQ connection must use TLS. |
ClientProperties
| Optional metadata dictionary sent with the RabbitMQ client connection. |
{ "trackingId": "trk-1" }