Skip to content

Run Mq Diagnostic

POST
/api/v1/system/mq-diagnostic

Run MQ connection diagnostic with verbose step-by-step output.

Tests STOMP connectivity to an MQ broker (e.g., AWS AmazonMQ) with detailed timeline of DNS, TCP, TLS, and STOMP handshake phases.

This is a one-shot diagnostic connection that does NOT use the production ArtemisQueueProvider. It’s designed for debugging connection issues with custom credentials.

Args: request: Connection parameters including host, port, credentials

Returns: MQDiagnosticResponse with step-by-step timeline and connection details

MQDiagnosticRequest

Connection parameters for MQ diagnostic test.

object
host
required
Host

MQ broker host (e.g., b-xxxxx.mq.eu-north-1.amazonaws.com)

string
port
Port

STOMP+SSL port (61614 for AWS MQ)

integer
default: 61614 >= 1 <= 65535
username
required
Username

MQ username

string
password
required
Password

MQ password

string
ssl_enabled
Ssl Enabled

Enable SSL/TLS (required for AWS MQ)

boolean
default: true
ssl_verify
Ssl Verify

Verify SSL certificates

boolean
default: true
heartbeat_send_ms
Heartbeat Send Ms

Heartbeat send interval (ms)

integer
default: 30000
heartbeat_receive_ms
Heartbeat Receive Ms

Heartbeat receive interval (ms)

integer
default: 30000
connect_timeout
Connect Timeout

Connection timeout (seconds)

number
default: 10 >= 0.1
broker_arn
Any of:
string
test_pubsub
Test Pubsub

Test message publish/subscribe flow

boolean
pubsub_timeout
Pubsub Timeout

Pub/sub test timeout (seconds)

number
default: 10 >= 0.1
message_count
Message Count

Number of test messages to publish

integer
default: 1 >= 1
report_modulo
Report Modulo

Report progress every N messages (0=auto: every 10% for <=1000, every 1000 for >1000)

integer
0
message_delay_ms
Message Delay Ms

Delay between messages in ms

integer
0
jitter_ms
Jitter Ms

Random jitter range to add to delay in ms

integer
0
throttle_rps
Any of:
number
>= 0.1
test_retry
Test Retry

Test publish retry behavior on SSLEOFError

boolean
retry_attempts
Retry Attempts

Number of retry attempts for publish

integer
default: 3 >= 1
retry_backoff_ms
Retry Backoff Ms

Base backoff between retries in ms

integer
default: 500
test_fresh_connection
Test Fresh Connection

Test fresh-connection-per-publish pattern (replicates ArtemisQueueProvider)

boolean
fresh_connection_count
Fresh Connection Count

Number of fresh-connection publishes to attempt

integer
default: 10 >= 1
fresh_connection_jitter_ms
Fresh Connection Jitter Ms

Max jitter in ms before each connection (0=disabled)

integer
default: 100
fresh_connection_concurrency
Fresh Connection Concurrency

Max concurrent fresh connections (semaphore limit)

integer
default: 5 >= 1
test_fresh_connection_with_retry
Test Fresh Connection With Retry

Test fresh-connection with retry logic (proves SSLEOFError fix)

boolean
fresh_retry_attempts
Fresh Retry Attempts

Max retry attempts per publish on SSLEOFError

integer
default: 3 >= 1
fresh_retry_backoff_ms
Fresh Retry Backoff Ms

Base backoff in ms (exponential: 100, 200, 400…)

integer
default: 100

Successful Response

MQDiagnosticResponse

Full MQ diagnostic result with connection timeline.

object
success
required
Success

Whether connection test succeeded

boolean
duration_ms
required
Duration Ms

Total diagnostic duration (ms)

number
stomp_url
required
Stomp Url

Formatted STOMP connection URL (stomp+ssl://host:port or stomp://host:port)

string
steps
Steps

Step-by-step connection timeline

Array<object>
DiagnosticStep

Single step in the connection diagnostic process.

object
timestamp_ms
required
Timestamp Ms

Milliseconds since diagnostic start

number
phase
required
Phase

Diagnostic phase: dns, tcp, tls, stomp, pubsub_publish, pubsub_subscribe, complete, error

string
event
required
Event

Human-readable event description

string
details
Any of:
object
key
additional properties
any
success
Success

Whether this step succeeded

boolean
default: true
connected
Connected

Whether STOMP connection was established

boolean
stomp_version
Any of:
string
server_heartbeat
Any of:
array
>= 2 items <= 2 items
session_id
Any of:
string
pubsub_test
Any of:
PubSubTestResult

Result of pub/sub message flow test.

object
success
required
Success

Whether pub/sub test succeeded

boolean
queue_name
Any of:
string
messages_sent
Messages Sent

Number of messages published

integer
0
messages_received
Messages Received

Number of messages received

integer
0
messages_expected
Messages Expected

Number of messages expected

integer
0
roundtrip_min_ms
Any of:
number
roundtrip_max_ms
Any of:
number
roundtrip_avg_ms
Any of:
number
total_duration_ms
Any of:
number
delay_applied_ms
Delay Applied Ms

Delay between messages in ms

integer
0
jitter_applied_ms
Jitter Applied Ms

Jitter range applied in ms

integer
0
throttle_applied_rps
Any of:
number
error
Any of:
string
retry_test
Any of:
RetryTestResult

Result of publish retry behavior test.

object
success
required
Success

Whether retry test succeeded

boolean
total_attempts
Total Attempts

Total publish attempts made

integer
0
successful_attempts
Successful Attempts

Number of successful publishes

integer
0
failed_attempts
Failed Attempts

Number of failed attempts before success

integer
0
ssl_errors_caught
Ssl Errors Caught

SSLEOFError count caught and retried

integer
0
connection_errors_caught
Connection Errors Caught

ConnectionLostError count caught

integer
0
other_errors_caught
Other Errors Caught

Other errors caught

integer
0
final_error
Any of:
string
retry_backoff_ms
Retry Backoff Ms

Backoff used between retries

integer
0
total_retry_time_ms
Any of:
number
fresh_connection_test
Any of:
FreshConnectionTestResult

Result of fresh-connection-per-publish test (replicates ArtemisQueueProvider pattern).

object
success
required
Success

Whether all publishes succeeded

boolean
total_attempts
Total Attempts

Total connection+publish attempts

integer
0
successful_publishes
Successful Publishes

Successful publishes

integer
0
failed_publishes
Failed Publishes

Failed publishes

integer
0
ssl_eof_errors
Ssl Eof Errors

SSLEOFError count

integer
0
connection_lost_errors
Connection Lost Errors

ConnectionLostError count

integer
0
connect_failed_errors
Connect Failed Errors

FailedAllConnectAttemptsError count

integer
0
other_errors
Other Errors

Other error count

integer
0
total_duration_ms
Any of:
number
avg_connection_time_ms
Any of:
number
avg_publish_time_ms
Any of:
number
jitter_applied_ms
Jitter Applied Ms

Jitter setting used

integer
0
concurrency_limit
Concurrency Limit

Concurrency limit used

integer
0
first_error_type
Any of:
string
first_error_message
Any of:
string
first_error_attempt
Any of:
integer
total_retries_needed
Total Retries Needed

Sum of all retries across all publishes

integer
0
publishes_succeeded_first_try
Publishes Succeeded First Try

Publishes that worked without retry

integer
0
publishes_succeeded_on_retry
Publishes Succeeded On Retry

Publishes that needed at least one retry

integer
0
max_retries_for_single_publish
Max Retries For Single Publish

Worst case retries for one publish

integer
0
retry_attempts_configured
Retry Attempts Configured

Max retry attempts setting used

integer
0
retry_backoff_ms_configured
Retry Backoff Ms Configured

Base backoff setting used

integer
0
error_type
Any of:
string
error_message
Any of:
string
error_traceback
Any of:
string
resolved_ip
Any of:
string
tls_version
Any of:
string
tls_cipher
Any of:
string
server_cert_subject
Any of:
string
server_cert_issuer
Any of:
string
server_cert_expires
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object