Ana içeriğe atla

General Information

Connection Type

activeMq

UI Documentation

Endpoints

List Connections

GET /apiops/projects/{projectName}/connections/?type=activeMq

Get Connection

GET /apiops/projects/{projectName}/connections/{connectionName}/

Create Connection

POST /apiops/projects/{projectName}/connections/{connectionName}/

Update Connection

PUT /apiops/projects/{projectName}/connections/{connectionName}/

Delete Connection

DELETE /apiops/projects/{projectName}/connections/{connectionName}/

List Connections

Endpoint

GET /apiops/projects/{projectName}/connections/?type=activeMq

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
Note: The type query parameter is required to filter connections by type.

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Connection

Endpoint

GET /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "type": "activeMq",
      "name": "my-activemq-connection",
      "description": "ActiveMQ connection for messaging",
      "deployToWorker": true,
      "enabled": true,
      "activeMqConnectionProtocolType": "TCP",
      "brokerURL": "tcp://activemq.example.com:61616",
      "username": "admin",
      "password": null,
      "destinationType": "QUEUE",
      "destinationName": "apinizer.queue",
      "sessionAcknowledgement": "AUTO_ACKNOWLEDGE",
      "sendTimeout": 60000,
      "requestTimeout": 60000,
      "closeTimeout": 60000,
      "connectTimeout": 60000,
      "contentType": "application/json",
      "clientID": "apinizer-client-1",
      "contentEncoding": "UTF-8"
    }
  ],
  "resultCount": 1
}
Note: Password is masked in get operations.

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-activemq-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Connection

Endpoint

POST /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer
Content-Typeapplication/json

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Request Body

Full JSON Body Example - Queue Connection (TCP)
{
  "type": "activeMq",
  "name": "my-activemq-connection",
  "description": "ActiveMQ connection for messaging",
  "deployToWorker": true,
  "enabled": true,
  "activeMqConnectionProtocolType": "TCP",
  "brokerURL": "tcp://activemq.example.com:61616",
  "username": "admin",
  "password": "admin123",
  "destinationType": "QUEUE",
  "destinationName": "apinizer.queue",
  "sessionAcknowledgement": "AUTO_ACKNOWLEDGE",
  "sendTimeout": 60000,
  "requestTimeout": 60000,
  "closeTimeout": 60000,
  "connectTimeout": 60000,
  "contentType": "application/json",
  "clientID": "apinizer-client-1",
  "contentEncoding": "UTF-8"
}
Full JSON Body Example - Topic Connection (AMQP)
{
  "type": "activeMq",
  "name": "my-activemq-topic",
  "description": "ActiveMQ topic connection",
  "deployToWorker": true,
  "enabled": true,
  "activeMqConnectionProtocolType": "AMQP",
  "brokerURL": "amqp://activemq.example.com:5672",
  "username": "admin",
  "password": "admin123",
  "destinationType": "TOPIC",
  "destinationName": "apinizer.topic",
  "sessionAcknowledgement": "CLIENT_ACKNOWLEDGE",
  "sendTimeout": 60000,
  "requestTimeout": 60000,
  "closeTimeout": 60000,
  "connectTimeout": 60000,
  "contentType": "application/json",
  "clientID": "apinizer-client-2",
  "contentEncoding": "UTF-8"
}
Full JSON Body Example - Transactional Session
{
  "type": "activeMq",
  "name": "my-activemq-transactional",
  "description": "ActiveMQ with transactional session",
  "deployToWorker": true,
  "enabled": true,
  "activeMqConnectionProtocolType": "TCP",
  "brokerURL": "tcp://activemq.example.com:61616",
  "username": "admin",
  "password": "admin123",
  "destinationType": "QUEUE",
  "destinationName": "apinizer.queue",
  "sessionAcknowledgement": "SESSION_TRANSACTED",
  "sendTimeout": 60000,
  "requestTimeout": 60000,
  "closeTimeout": 60000,
  "connectTimeout": 60000,
  "contentType": "application/json",
  "clientID": "apinizer-client-3",
  "contentEncoding": "UTF-8"
}
Request Body Fields
Common Fields
FieldTypeRequiredDefaultDescription
typestringYes-Connection type discriminator field. Identifies the connection type in API requests/responses.
namestringYes-Connection name (must match path parameter)
descriptionstringNo-Connection description
deployToWorkerbooleanNotrueWhether to deploy to worker
enabledbooleanNotrueWhether connection is enabled
ActiveMQ-Specific Fields
FieldTypeRequiredDefaultDescription
activeMqConnectionProtocolTypestringYes-Connection protocol type. See EnumActiveMqConnectionProtocolType
brokerURLstringYes-ActiveMQ broker URL (e.g., tcp://host:port or amqp://host:port)
usernamestringNo-Username for broker authentication
passwordstringNo-Password for broker authentication (secret field)
destinationTypestringYes-Destination type. See EnumDestinationType
destinationNamestringYes-Queue or topic name
sessionAcknowledgementstringNoAUTO_ACKNOWLEDGESession acknowledgment mode. See EnumSessionAcknowledgmentType
sendTimeoutlongNo60000Send timeout in milliseconds
requestTimeoutlongNo60000Request timeout in milliseconds
closeTimeoutlongNo60000Close timeout in milliseconds
connectTimeoutlongNo60000Connection timeout in milliseconds
contentTypestringNo-Content type for messages (e.g., application/json)
clientIDstringNo-Client identifier for durable subscriptions
contentEncodingstringNo-Content encoding (e.g., UTF-8)

EnumActiveMqConnectionProtocolType (activeMqConnectionProtocolType)

  • TCP - TCP protocol (standard ActiveMQ protocol, port 61616)
  • AMQP - AMQP protocol (Advanced Message Queuing Protocol, port 5672)

EnumDestinationType (destinationType)

  • QUEUE - Point-to-point messaging (one consumer per message)
  • TOPIC - Publish-subscribe messaging (multiple consumers per message)

EnumSessionAcknowledgmentType (sessionAcknowledgement)

  • AUTO_ACKNOWLEDGE - Messages are automatically acknowledged when received (default)
  • CLIENT_ACKNOWLEDGE - Client must explicitly acknowledge messages
  • DUPS_OK_ACKNOWLEDGE - Allows duplicate messages (lazy acknowledgment)
  • SESSION_TRANSACTED - Session is transactional (messages committed/rolled back)

Notes

  • activeMqConnectionProtocolType, brokerURL, destinationType, and destinationName are required.
  • brokerURL format:
    • TCP: tcp://hostname:61616 or tcp://hostname:61616?options
    • AMQP: amqp://hostname:5672 or amqp://hostname:5672?options
  • username and password are optional but required if broker authentication is enabled.
  • destinationName is the queue or topic name (e.g., apinizer.queue, apinizer.topic).
  • clientID is required for durable topic subscriptions.
  • Timeout values are in milliseconds (default: 60000ms = 60 seconds).
  • contentType and contentEncoding are optional metadata for messages.

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Deployment successful"
      }
    ]
  }
}

cURL Example

curl -X POST \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-activemq-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "activeMq",
    "name": "my-activemq-connection",
    "description": "ActiveMQ connection for messaging",
    "deployToWorker": true,
    "enabled": true,
    "activeMqConnectionProtocolType": "TCP",
    "brokerURL": "tcp://activemq.example.com:61616",
    "username": "admin",
    "password": "admin123",
    "destinationType": "QUEUE",
    "destinationName": "apinizer.queue",
    "sessionAcknowledgement": "AUTO_ACKNOWLEDGE",
    "sendTimeout": 60000,
    "requestTimeout": 60000,
    "closeTimeout": 60000,
    "connectTimeout": 60000,
    "contentType": "application/json",
    "clientID": "apinizer-client-1",
    "contentEncoding": "UTF-8"
  }'

Update Connection

Endpoint

PUT /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer
Content-Typeapplication/json

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name (must match name in body)

Request Body

Full JSON Body Example
{
  "type": "activeMq",
  "name": "my-activemq-connection",
  "description": "Updated ActiveMQ connection for messaging",
  "deployToWorker": true,
  "enabled": true,
  "activeMqConnectionProtocolType": "TCP",
  "brokerURL": "tcp://activemq.example.com:61616",
  "username": "admin",
  "password": "admin123",
  "destinationType": "QUEUE",
  "destinationName": "apinizer.queue",
  "sessionAcknowledgement": "AUTO_ACKNOWLEDGE",
  "sendTimeout": 60000,
  "requestTimeout": 60000,
  "closeTimeout": 60000,
  "connectTimeout": 60000,
  "contentType": "application/json",
  "clientID": "apinizer-client-1",
  "contentEncoding": "UTF-8"
}
Note: Request body structure is the same as Create Connection. All fields should be provided for update.

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [...]
  }
}

Delete Connection

Endpoint

DELETE /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [...]
  }
}

Notes and Warnings

  • Protocol Types:
    • TCP - Standard ActiveMQ protocol (port 61616, default)
    • AMQP - AMQP protocol (port 5672, for interoperability)
  • Broker URL:
    • TCP format: tcp://hostname:61616 or tcp://hostname:61616?options
    • AMQP format: amqp://hostname:5672 or amqp://hostname:5672?options
    • URL options can include connection parameters
  • Destination Types:
    • QUEUE - Point-to-point (one consumer per message, guaranteed delivery)
    • TOPIC - Publish-subscribe (multiple consumers, broadcast messaging)
  • Session Acknowledgment:
    • AUTO_ACKNOWLEDGE - Automatic acknowledgment (default, simplest)
    • CLIENT_ACKNOWLEDGE - Manual acknowledgment (more control)
    • DUPS_OK_ACKNOWLEDGE - Lazy acknowledgment (allows duplicates)
    • SESSION_TRANSACTED - Transactional (guaranteed delivery, can rollback)
  • Durable Subscriptions:
    • For topic subscriptions, clientID is required for durable subscriptions
    • Durable subscriptions survive client disconnections
    • Each clientID must be unique
  • Timeouts:
    • All timeout values are in milliseconds
    • Default: 60000ms (60 seconds)
    • sendTimeout - Maximum time to wait for send operation
    • requestTimeout - Maximum time to wait for request response
    • closeTimeout - Maximum time to wait for connection close
    • connectTimeout - Maximum time to wait for connection establishment
  • Authentication:
    • username and password are optional
    • Required if ActiveMQ broker has authentication enabled
    • Use strong passwords in production
  • Content Type and Encoding:
    • contentType - MIME type for messages (e.g., application/json, text/xml)
    • contentEncoding - Character encoding (e.g., UTF-8, ISO-8859-1)
    • These are metadata fields, not enforced by ActiveMQ
  • Performance:
    • Connection pooling improves performance
    • Timeout settings affect behavior under load
    • Transactional sessions have higher overhead
  • Security:
    • Use authentication for production deployments
    • Consider using SSL/TLS for encrypted connections (configure in brokerURL)
    • Store passwords securely
  • Deployment: Connection changes require deployment to take effect. Set deployToWorker: true or deploy manually.