> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ActiveMQ

> Provides secure and manageable connections to ActiveMQ brokers. You can perform message queue and topic-based reliable asynchronous messaging with AMQP/TCP protocols, and centralize message sending and receiving operations

## Overview

<AccordionGroup>
  <Accordion title="What is its Purpose?">
    <CardGroup cols={2}>
      <Card title="Centralized Management" icon="database">
        Connection provides reliable access to ActiveMQ brokers, centralizing message sending and receiving operations.
      </Card>

      <Card title="Reusability" icon="repeat">
        Eliminates configuration repetition by providing reusable connection parameters across different Integration Flow steps.
      </Card>

      <Card title="Environment-Based Management" icon="code-branch">
        Provides consistent deployment processes between Development, Test, and Production through environment-based management.
      </Card>

      <Card title="Performance and Durability" icon="gauge">
        Provides performance and durability in high-traffic scenarios thanks to advanced timeout and pool management.
      </Card>
    </CardGroup>
  </Accordion>

  <Accordion title="Working Principle">
    <CardGroup cols={2}>
      <Card title="Connection Initiation" icon="play">
        When a Message Queue connection is requested from within an Integration Flow or Connector, the system reads the configured connection parameters.
      </Card>

      <Card title="Connection Pool Management" icon="layer-group">
        Previously opened connections are reused with active connection pool strategy; if pool is full, a new connection is created.
      </Card>

      <Card title="Authentication" icon="shield">
        Authentication to broker is performed with basic Authentication mechanism (username/password) or optional SSL/TLS certificate verification.
      </Card>

      <Card title="Data Communication" icon="arrows-rotate">
        JMS messages are transmitted or consumed synchronously/asynchronously to Queue or Topic targets over AMQP/TCP protocol.
      </Card>

      <Card title="Connection Management" icon="gear">
        When the operation completes, the connection returns to the pool; passive connections are closed according to pool policies.
      </Card>

      <Card title="Error Management" icon="triangle-exclamation">
        In case of connection error, timeout, or authentication error, error details are logged, system automatically retries and produces a warning message to the user.
      </Card>
    </CardGroup>
  </Accordion>

  <Accordion title="Usage Areas">
    <CardGroup cols={2}>
      <Card title="Asynchronous Message Queue" icon="inbox">
        Application components executing asynchronous message queue operations via ActiveMQ.
      </Card>

      <Card title="Reliable Message Broadcast" icon="broadcast">
        Reliable message broadcast and consumption in Queue or Topic-based integrations.
      </Card>

      <Card title="High Volume Message Scenarios" icon="chart-line">
        High volume message scenarios in business intelligence, notification, or integration services.
      </Card>

      <Card title="Inter-Microservice Communication" icon="network-wired">
        AMQP-based event sharing in inter-microservice communication.
      </Card>

      <Card title="Legacy JMS Integration" icon="code">
        Including legacy JMS applications in modern Integration Flow steps.
      </Card>
    </CardGroup>
  </Accordion>
</AccordionGroup>

## Technical Features and Capabilities

### Basic Features

**Protocol Flexibility:** Provides connections suitable for different ActiveMQ distributions with AMQP or TCP protocol selection.

**Destination Management:** Manages Queue or Topic destinations from a single screen, storing them together with necessary credentials.

**Session Acknowledgement Policy:** Fast integration with AUTO\_ACKNOWLEDGE default; provides advanced control with CLIENT\_ACKNOWLEDGE or TRANSACTED.

**Environment-Based Configuration:** Ability to define separate connection parameters for each environment (Development, Test, Production).

**Enable/Disable Control:** Activating or deactivating the Connection (enable/disable toggle). In passive state, the connection cannot be used but its configuration is preserved.

### Advanced Features

**Timeout Management:** Connection, request response, and message sending durations can be precisely adjusted in milliseconds.

**Content Customization:** Message metadata is standardized with Content-Type and Content-Encoding fields.

**Client ID Definition:** Persistent subscription or durable consumer scenarios become possible thanks to JMS ClientID support.

**Connection Test Feature:** Ability to validate connection parameters before saving via "Test Connection" button.

**Export/Import Feature:** Exporting Connection configuration as a ZIP file. Importing to different environments (Development, Test, Production). Version control and backup capability.

**Connection Monitoring:** Monitoring connection health, pool status, and performance metrics.

## Connection Parameters

<AccordionGroup>
  <Accordion title="Mandatory Parameters">
    <CardGroup cols={2}>
      <Card title="Name" icon="tag">
        **Description:** Connection name (must be unique)\
        **Example Value:** `Production_ActiveMQ`\
        **Notes:** Should not start with space, special characters should not be used
      </Card>

      <Card title="Broker URL" icon="link">
        **Description:** ActiveMQ broker access address\
        **Example Value:** `tcp://mq.prod.local:61616`\
        **Notes:** Includes protocol (amqp/tcp) and port value
      </Card>

      <Card title="Username" icon="user">
        **Description:** ActiveMQ access username\
        **Example Value:** `mq_service_user`\
        **Notes:** Authorized account should be used
      </Card>

      <Card title="Password" icon="lock">
        **Description:** Password belonging to the user\
        **Example Value:** `********`\
        **Notes:** Secret manager should be used for password storage
      </Card>

      <Card title="Destination Type" icon="list">
        **Description:** Queue or Topic selection\
        **Example Value:** `QUEUE`\
        **Notes:** Enum values: QUEUE, TOPIC
      </Card>

      <Card title="Destination Name" icon="file-lines">
        **Description:** Message queue or topic name\
        **Example Value:** `order.events.queue`\
        **Notes:** Should comply with namespace rules
      </Card>

      <Card title="ActiveMQ Connection Protocol Type" icon="network-wired">
        **Description:** Connection protocol to be used\
        **Example Value:** `AMQP`\
        **Notes:** Enum values: AMQP, TCP
      </Card>

      <Card title="Session Acknowledgement" icon="check">
        **Description:** JMS session acknowledgement type\
        **Example Value:** `AUTO_ACKNOWLEDGE`\
        **Notes:** Enum values: AUTO\_ACKNOWLEDGE, CLIENT\_ACKNOWLEDGE, SESSION\_TRANSACTED, DUPS\_OK\_ACKNOWLEDGE
      </Card>

      <Card title="Environment Id" icon="server">
        **Description:** Environment selection reference\
        **Example Value:** `env-prod-01`\
        **Notes:** Environment list comes from Environment service
      </Card>
    </CardGroup>
  </Accordion>

  <Accordion title="Optional Parameters">
    <CardGroup cols={2}>
      <Card title="Send Timeout" icon="clock">
        **Description:** Wait time for message sending\
        **Default Value:** 60000\
        **Recommended Value:** 30000 - 120000 range according to need
      </Card>

      <Card title="Request Timeout" icon="hourglass">
        **Description:** Response wait time\
        **Default Value:** 60000\
        **Recommended Value:** 45000 for critical operations
      </Card>

      <Card title="Close Timeout" icon="xmark">
        **Description:** Connection closing time\
        **Default Value:** 60000\
        **Recommended Value:** 90000 for long sessions
      </Card>

      <Card title="Connect Timeout" icon="plug">
        **Description:** Time to connect to broker\
        **Default Value:** 60000\
        **Recommended Value:** 90000 ms in high latency networks
      </Card>

      <Card title="Content Type" icon="file-code">
        **Description:** Message content type\
        **Default Value:** application/json\
        **Recommended Value:** application/xml according to workload
      </Card>

      <Card title="Content Encoding" icon="language">
        **Description:** Message character set\
        **Default Value:** UTF-8\
        **Recommended Value:** Standard UTF-8 usage is recommended
      </Card>

      <Card title="Client ID" icon="id-card">
        **Description:** Persistent subscription identity\
        **Default Value:** durable-consumer-1\
        **Recommended Value:** Mandatory in durable topic subscriptions
      </Card>
    </CardGroup>
  </Accordion>
</AccordionGroup>

### Timeout and Connection Pool Parameters

<CardGroup cols={2}>
  <Card title="Connection Timeout" icon="clock">
    **Description:** Maximum wait time for connection establishment\
    **Default:** 60000\
    **Min:** 1000 | **Max:** 180000\
    **Unit:** milliseconds
  </Card>

  <Card title="Request Timeout" icon="hourglass">
    **Description:** Maximum wait time for request response\
    **Default:** 60000\
    **Min:** 1000 | **Max:** 180000\
    **Unit:** milliseconds
  </Card>

  <Card title="Pool Size" icon="layer-group">
    **Description:** Maximum number of connections in Connection pool\
    **Default:** 10\
    **Min:** 1 | **Max:** 200\
    **Unit:** count
  </Card>

  <Card title="Send Timeout" icon="paper-plane">
    **Description:** Expected longest duration for message sending\
    **Default:** 60000\
    **Min:** 5000 | **Max:** 180000\
    **Unit:** milliseconds
  </Card>
</CardGroup>

### Usage Scenarios

<CardGroup cols={2}>
  <Card title="Order Queue Consumption" icon="inbox">
    **Situation:** New order messages are falling into ActiveMQ queue\
    **Solution:** Destination Type=QUEUE, Destination Name=order.events.queue, Protocol=AMQP\
    **Expected Behavior:** Integration Flow consumes order messages sequentially
  </Card>

  <Card title="Live Notification Broadcast" icon="broadcast">
    **Situation:** Websocket notifications will be distributed via topic\
    **Solution:** Destination Type=TOPIC, Destination Name=notifications.topic, ClientID=notif-producer\
    **Expected Behavior:** All subscribers receive real-time notifications
  </Card>

  <Card title="High Security Broker" icon="shield">
    **Situation:** Production broker only accepts SSL\
    **Solution:** Protocol=TCP, Broker URL=ssl://mq.prod.local:61617, SSL certificate attachments\
    **Expected Behavior:** Encrypted connection is successfully established
  </Card>

  <Card title="Long Duration Operation" icon="hourglass">
    **Situation:** Batch job is sending large message packages\
    **Solution:** Send Timeout=120000, Request Timeout=120000, Pool Size=30\
    **Expected Behavior:** Message sending completes without interruption
  </Card>

  <Card title="Test Environment Simulation" icon="flask">
    **Situation:** Test broker is low-resource\
    **Solution:** Pool Size=5, Request Timeout=45000, Content Type=application/json\
    **Expected Behavior:** Resource usage is optimized, test runs stably
  </Card>

  <Card title="Disaster Recovery" icon="rotate">
    **Situation:** Need to switch to backup broker\
    **Solution:** Broker URL is updated to secondary address, activated with Enable toggle\
    **Expected Behavior:** Traffic seamlessly shifts to backup broker
  </Card>
</CardGroup>

## Connection Configuration

### Creating New Apache ActiveMQ

<img src="https://mintcdn.com/apinizer/YX1NcEKlSBeHefxE/images/yonetici/baglantilar/active-variable-new.png?fit=max&auto=format&n=YX1NcEKlSBeHefxE&q=85&s=fd899237f30a1781484f820a6d22a62f" alt="Image 2024 9 9 15 35 35 Pn" width="1000" className="mr-auto" data-path="images/yonetici/baglantilar/active-variable-new.png" />

#### Configuration Steps

<Steps>
  <Step title="Navigating to Creation Page">
    * Go to Connection → Apache ActiveMQ section from the left menu.
    * Click the \[+ Create] button at the top right.
  </Step>

  <Step title="Entering Basic Information">
    **Enable Status (Active Status):**

    Set active/passive status with toggle. New connections are active by default.

    **Name (Mandatory):**

    Example: `Production_ActiveMQ`

    * Enter unique name, should not start with space.
    * System automatically checks. Green checkmark: available. Red X: existing name.

    **Description:**

    Example: "Order queue integration"

    * Max. 1000 characters.
    * Describe the purpose of the connection.

    <Info>
      In the action button area at the top of the page, you can use the **\[\<> Variable]** button to select dynamic values, and using global variables, you can manage connection parameters with variable-based values instead of fixed values. For detailed information, review the [Dynamic Variables](/en/concepts/core-concepts/dynamic-variables) page.
    </Info>
  </Step>

  <Step title="Environment Selection">
    * Select environment from dropdown menu: Development, Test, or Production.
    * Different connection parameters can be defined for each environment.
  </Step>

  <Step title="ActiveMQ Basic Parameters">
    * Enter Broker URL, ActiveMQ Connection Protocol Type, Destination Type, Destination Name fields.
    * Broker URL should comply with AMQP/TCP schema; destination type should be selected as Queue or Topic.
  </Step>

  <Step title="Messaging Session and Content Settings">
    * Determine Session Acknowledgement type according to your JMS strategy. Optionally fill Content Type, Content Encoding, Client ID fields.
    * Client ID is required in durable topic subscriptions.
  </Step>

  <Step title="Timeout and Connection Pool Settings">
    * Enter Send Timeout, Request Timeout, Connect Timeout, Close Timeout values in milliseconds.
    * Optimize pool sizes and durations for heavy traffic.
  </Step>

  <Step title="Security and Authentication Settings">
    * Fill Username and Password fields. If SSL/TLS requirements exist, configure broker URL with ssl:// and add necessary certificates to Environment repository.
  </Step>

  <Step title="Test Connection">
    * Click the \[Test Connection] button.
    * Test whether connection parameters are correct.
    * Successful: Green confirmation message, Failed: Error details are shown.
  </Step>

  <Step title="Saving">
    * Click the \[Save and Deploy] button at the top right.

    **Checklist:**

    * Unique name
    * Mandatory fields filled
    * Test connection successful (recommended)

    **Result:**

    * Connection is added to list.
    * Becomes available for use in Integration Flow and Connector steps.
    * Becomes active according to environment.
  </Step>
</Steps>

### Deleting Connection

<CardGroup cols={2}>
  <Card title="Deletion Process" icon="trash">
    * Select **Delete** from the **⋮** menu at the end of the row.
    * Or click the **\[Delete]** button on the connection detail page.
  </Card>

  <Card title="Deletion Tips" icon="info-circle">
    **Check Before Deleting:**

    * May be used in Integration Flow or Connector steps.
    * Assign an alternative connection if necessary.
    * Take backup with Export before deleting.

    **Alternative: Deactivate**

    * Use Disable option instead of deleting.
    * Connection becomes passive but is not deleted.
    * Can be reactivated when needed.
  </Card>
</CardGroup>

### Exporting/Importing Connection

<Info>
  In this step, users can export (export) existing connections for backup, moving to different environments, or sharing purposes, or import (import) a previously exported connection again. This operation is used to maintain data integrity in version control, transition between test and production environments, or inter-team sharing processes.
</Info>

<AccordionGroup>
  <Accordion title="Export">
    <CardGroup cols={2}>
      <Card title="Method 1" icon="download">
        Select **⋮ → Export** from the action menu. ZIP file is automatically downloaded.
      </Card>

      <Card title="Method 2" icon="file-export">
        Click the **\[Export]** button on the connection detail page. ZIP file is downloaded.
      </Card>

      <Card title="File Format" icon="file-zipper">
        Format: `{Date}-connection-{ConnectionName}-export.zip`\
        Example: `13 Nov 2025-connection-Production_ActiveMQ-export.zip`
      </Card>

      <Card title="ZIP Contents" icon="folder-open">
        * Connection JSON file
        * Metadata information
        * Dependency information (e.g., certificates, key store)
      </Card>

      <Card title="Usage Areas" icon="list-check">
        * Backup
        * Moving between environments (Test → Prod)
        * Versioning
        * Team or project-based sharing
      </Card>
    </CardGroup>
  </Accordion>

  <Accordion title="Import">
    <CardGroup cols={2}>
      <Card title="Import Steps" icon="upload">
        * Click the **\[Import Apache ActiveMQ]** button on the main list.
        * Select the downloaded ZIP file.
        * System checks: Is format valid? Is there a name conflict? Are dependencies available?
        * Then click the **\[Import]** button.
      </Card>

      <Card title="Import Scenarios" icon="info-circle">
        **Scenario 1: Name Conflict** → Overwrite the old connection or create with a new name.

        **Scenario 2: Missing Dependencies** → Create missing certificates or key stores first or exclude them during import.
      </Card>
    </CardGroup>
  </Accordion>
</AccordionGroup>

## Connection Usage Areas

<CardGroup cols={2}>
  <Card title="Creating and Activating Connection" icon="plus-circle">
    **Steps:**

    1. Create the connection.
    2. Verify the connection with Test Connection.
    3. Save and activate with Save and Deploy.
    4. Make sure the connection is in Enabled status.
  </Card>

  <Card title="Usage in Integration / Connector Steps" icon="plug">
    * Connection is selected in steps that require communication with external systems such as message queue (queue), topic, email, FTP/SFTP, LDAP, or similar.
    * Example: Steps like "Send Message", "Consume Message", "Upload File", "Read Directory".
    * Connection selection is made from the Connection field in the configuration of these steps.
  </Card>

  <Card title="Scheduled Job Usage" icon="clock">
    * In scheduled tasks (e.g., sending messages at certain intervals, file processing, etc.), access to external systems is provided by selecting connection.
    * When connection changes, job execution behavior is updated accordingly.
  </Card>

  <Card title="Test Purpose Usage" icon="flask">
    * Connection correctness can be checked independently from Integration Flow with Connection Test feature.
    * This test is critical in the debugging process.
  </Card>
</CardGroup>

## Best Practices

### Things to Do and Best Practices

| Category                       | Description / Recommendations                                                                                                                                                                                                                                                                               |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Destination Management         | **Bad:** Routing all workloads to a single queue.<br /><br />**Good:** Defining separate Queue/Topic for different business types.<br /><br />**Best:** Using own destination for each business type and documenting naming standards.                                                                      |
| Protocol Selection             | **Bad:** Using default TCP and ignoring security requirements.<br /><br />**Good:** Preferring TCP in internal network, AMQP in external network.<br /><br />**Best:** Providing encrypted communication using SSL/TLS supported AMQP                                                                       |
| Session Acknowledgement Policy | **Bad:** Using AUTO\_ACKNOWLEDGE in all flows.<br /><br />**Good:** Switching to CLIENT\_ACKNOWLEDGE in critical operations.<br /><br />**Best:** Using SESSION\_TRANSACTED in transactional flows and applying rollback on failure.                                                                        |
| Credential Management          | **Bad:** Storing username/password as plain text.<br /><br />**Good:** Masking in configuration file.<br /><br />**Best:** Retrieving dynamically via Secret Manager or environment variable.                                                                                                               |
| Observability                  | **Bad:** Not tracking connection logs.<br /><br />**Good:** Monitoring basic error logs.<br /><br />**Best:** Sending pool, timeout, and broker metrics to centralized monitoring system.                                                                                                                   |
| Environment Management         | **Bad:** Using the same connection parameters in all environments.<br /><br />**Good:** Creating separate connections for each environment.<br /><br />**Best:** Managing all environments in a single connection using Environment option, only changing environment during inter-environment transitions. |
| Connection Test                | **Bad:** Saving and deploying connection without testing.<br /><br />**Good:** Verifying with Test Connection before saving.<br /><br />**Best:** Testing after every parameter change, performing full integration test in test environment before moving to production.                                   |

### Security Best Practices

| Security Area                 | Description / Warnings                                                                                                                                                                             |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Broker Access Authorization   | Allow only service accounts that need it. Apply role-based policies and remove unnecessary users.                                                                                                  |
| Password Management           | Periodically renew passwords, use minimum 16 characters, activate audit logs to prevent unauthorized sharing.                                                                                      |
| Durable Subscriber Protection | Keep Client IDs unique, do not use the same identity in multiple applications; otherwise message loss may occur.                                                                                   |
| Credential Management         | Store sensitive information such as username and password using environment variable or secret manager. Do not hardcode credentials in code or configuration files. Periodically update passwords. |
| SSL/TLS Usage                 | Always enable SSL/TLS in Production environment. Use self-signed certificates only in development environment. Track certificate expiration dates and renew on time.                               |
| Access Control                | Allow only authorized users to change Connection configuration. Store connection change logs. Apply change approval process for critical connections.                                              |

### Things to Avoid

| Category                                        | Description / Warnings                                                                                                                                                                                                                                                                                            |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Wrong Destination Name                          | **Why to avoid:** Broker target cannot be found, messages are lost.<br /><br />**Alternative:** Validate destination names in deployment pipeline.                                                                                                                                                                |
| Excessive Pool Size                             | **Why to avoid:** Resource consumption increases on broker side.<br /><br />**Alternative:** Determine measured pool sizes according to traffic.                                                                                                                                                                  |
| Non-Standard Encoding                           | **Why to avoid:** Consumers may not be able to decode the message.<br /><br />**Alternative:** Maintain UTF-8 standard, coordinate if different encoding is needed.                                                                                                                                               |
| Using Production Connection in Test Environment | **Why to avoid:** Test data can be written to production system, real users can be affected, security risk occurs.<br /><br />**Alternative:** Create separate connections for each environment, use environment parameter, separate connection names by adding prefix according to environment (Test\_, Prod\_). |
| Very Low Timeout Values                         | **Why to avoid:** Connection constantly times out in network delays, requests fail.<br /><br />**Alternative:** Adjust timeout values according to real usage scenarios, measure network latency and determine timeouts accordingly.                                                                              |
| Not Using Connection Pool                       | **Why to avoid:** New connection is opened for every request, performance decreases, resource consumption increases, target system load increases.<br /><br />**Alternative:** Activate connection pool, adjust pool size according to traffic volume, set up pool monitoring.                                    |

### Performance Tips

| Criterion                    | Recommendation / Impact                                                                                                                                                                                                                                                                       |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Broker Cluster Integration   | **Recommendation:** Use failover URI structure (failover:(tcp\://node1:61616,tcp\://node2:61616)).<br /><br />**Impact:** Automatic reconnection is provided in broker interruptions.                                                                                                         |
| Message Throughput           | **Recommendation:** Increase Send Timeout and Pool Size values in high volume sends.<br /><br />**Impact:** Message queues are consumed without accumulation.                                                                                                                                 |
| Ack Strategy                 | **Recommendation:** Provide manual control with CLIENT\_ACKNOWLEDGE in critical flows.<br /><br />**Impact:** Reduces message loss risk.                                                                                                                                                      |
| Connection Pool Optimization | **Recommendation:** Adjust pool size according to peak traffic (recommended: concurrent request count × 1.5), set idle connection timeouts, perform pool health check.<br /><br />**Impact:** Connection opening cost decreases by 80%, response times decrease, resource usage is optimized. |
| Timeout Values Optimization  | **Recommendation:** Measure real network latency, adjust timeout values accordingly, avoid very low or very high timeouts.<br /><br />**Impact:** Unnecessary waits are prevented, fast fail-over is provided, user experience improves.                                                      |
| Connection Monitoring        | **Recommendation:** Monitor connection pool usage, track timeout rates, perform connection health check, set up alerting.<br /><br />**Impact:** Problems are detected proactively, performance bottlenecks are identified early, downtime decreases.                                         |

## Troubleshooting

| Problem                                                     | Possible Causes                                                                                                                             | Solution Steps                                                                                                                                                                                                            |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Cannot Connect to Broker                                    | - Wrong Broker URL<br />- Firewall barrier<br />- Broker service is down                                                                    | 1. Verify Broker URL and port<br />2. Test network access (telnet, nc)<br />3. Check broker logs                                                                                                                          |
| Destination Not Found                                       | - Queue/topic not created<br />- Wrong name entered<br />- Authorization missing                                                            | 1. Verify destination from broker management console<br />2. Update connection parameter<br />3. Check user permissions                                                                                                   |
| Connection Timeout                                          | - Network delay<br />- Target system responding slowly<br />- Timeout value too low                                                         | 1. Check network connectivity<br />2. Check target system health<br />3. Increase timeout values<br />4. Review connection logs                                                                                           |
| Authentication Failed                                       | - Wrong username/password<br />- Expired credentials<br />- Authorization problem                                                           | 1. Verify credentials<br />2. Check that user is active in target system<br />3. Check that necessary permissions are granted<br />4. Check SSL/TLS certificates                                                          |
| Pool Exhausted                                              | - Pool size too low<br />- Connection leak exists<br />- Traffic too high                                                                   | 1. Increase pool size<br />2. Check that connections are properly closed<br />3. Set idle connection timeouts<br />4. Monitor connection usage metrics                                                                    |
| Connection Test Successful But Integration Flow Gives Error | - Different connection may be selected in Integration/Connector step<br />- Step may be misconfigured<br />- Flow/Job may not be redeployed | 1. Check that Connection's enable toggle is active<br />2. Verify that correct connection is selected in Integration Flow<br />3. Redeploy Connection<br />4. Redeploy Integration Flow or Job<br />5. Check Gateway logs |

## Frequently Asked Questions (FAQ)

| Category  | Question                                                                            | Answer                                                                                                                                                                                                                                                                 |
| --------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| General   | Can I manage multiple destinations within the same broker with a single connection? | Yes, the same Apache ActiveMQ connection can be used with different destinations in different Integration Flow steps; target destination configuration must be done separately in each step.                                                                           |
| General   | Does message consumption completely stop when connection is disabled?               | When disabled, the connection is not reused, integration steps return error or force connection selection.                                                                                                                                                             |
| Technical | What settings should I change to switch from AMQP to TCP?                           | Set ActiveMQ Connection Protocol Type value to TCP, update Broker URL to tcp\:// or ssl:// schema, check firewall ports.                                                                                                                                               |
| Technical | How is durable topic subscription activated?                                        | Set Destination Type=TOPIC, enter ClientID field uniquely and enable durable subscriber option on Integration Flow side.                                                                                                                                               |
| Usage     | Is automatic retry performed on connection if queue is full?                        | If broker side returns error, ActiveMQ client retries; still you need to track application logs and do capacity planning.                                                                                                                                              |
| General   | Can I use the same connection in multiple Integration Flows?                        | Yes, the same connection can be used in multiple Integration Flow or Connector steps. This provides centralized management and guarantees configuration consistency. However, changes made to the connection will affect all usage locations, so care should be taken. |
| Technical | Is using connection pool mandatory?                                                 | Using connection pool is not mandatory but strongly recommended in high-traffic systems. Reusing existing connections instead of opening new connections for every request significantly improves performance.                                                         |
| Usage     | Should I create different connections for Test and Production?                      | Yes, it is recommended to create separate connections for each environment. Alternatively, you can manage all environments within a single connection using the environment parameter. This approach provides easier management and less error risk.                   |
| Technical | Test Connection is successful but not working in Integration Flow, why?             | Several reasons may exist: 1) Connection enable toggle may be passive, 2) A different connection may be selected in Integration step, 3) Connection may not be deployed, 4) Integration Flow may not have been redeployed yet.                                         |

## Examples for BROKER URL

### AMQP URL Examples

| Scenario               | URL Example                                                                                             | Description                           |
| ---------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| Simple Connection      | `amqp://localhost:5672`                                                                                 | Most basic AMQP connection            |
| Authenticated          | `amqp://user:password@localhost:5672`                                                                   | Connection with username and password |
| SSL/TLS                | `amqps://secure-broker.example.com:5671`                                                                | Secure AMQP connection                |
| Multiple Brokers       | `amqp://broker1:5672,amqp://broker2:5672`                                                               | Connection to multiple brokers        |
| With Timeout Settings  | `amqp://localhost:5672?transport.connectTimeout=30000&transport.requestTimeout=30000`                   | Timeout values specified              |
| SSL and Failover       | `amqps://broker:5671?transport.trustStoreLocation=/path/truststore.jks&failover.maxReconnectAttempts=5` | SSL and reconnection settings         |
| With Prefetch Settings | `amqp://broker:5672?jms.prefetchPolicy.all=1000`                                                        | Message prefetch settings             |
| Multi-Featured         | `amqp://broker:5672?jms.prefetchPolicy.all=1000&amqp.idleTimeout=30000&transport.connectTimeout=30000`  |                                       |

### TCP URL Examples

| Scenario               | URL Example                                                                                                                    | Description                           |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------- |
| Simple Connection      | `tcp://localhost:61616`                                                                                                        | Most basic TCP connection             |
| Authenticated          | `tcp://user:password@localhost:61616`                                                                                          | Connection with username and password |
| With Timeout Settings  | `tcp://localhost:61616?soTimeout=30000&soWriteTimeout=30000`                                                                   | Timeout values specified              |
| Simple Failover        | `failover:(tcp://broker1:61616,tcp://broker2:61616)`                                                                           | Basic failover configuration          |
| With SSL               | `ssl://secure-broker:61617?needClientAuth=true&keyStore=/path/keystore.jks`                                                    | SSL certificate connection            |
| Performance Optimized  | `tcp://localhost:61616?tcpNoDelay=true&socketBufferSize=65536`                                                                 | Optimized for performance             |
| High Availability      | `failover:(tcp://primary:61616,tcp://backup:61616)?maxReconnectAttempts=-1`                                                    | Configured for high availability      |
| Full Failover          | `failover:(tcp://broker1:61616,tcp://broker2:61616)?initialReconnectDelay=1000&maxReconnectDelay=30000&maxReconnectAttempts=5` | Detailed failover settings            |
| Production Environment | `failover:(tcp://prod1:61616,tcp://prod2:61616)?randomize=true&priorityBackup=true&useExponentialBackOff=true`                 | Optimized for production environment  |

### Important Parameters and Values

| Parameter Type | Parameter                        | Example Value | Description                   |
| -------------- | -------------------------------- | ------------- | ----------------------------- |
| Timeout        | soTimeout                        | 30000         | Socket read timeout (ms)      |
| Timeout        | soWriteTimeout                   | 30000         | Socket write timeout (ms)     |
| Failover       | maxReconnectAttempts             | 5             | Maximum reconnection attempts |
| Failover       | initialReconnectDelay            | 1000          | Initial connection delay (ms) |
| Performance    | tcpNoDelay                       | true          | TCP Nagle algorithm disabled  |
| Performance    | socketBufferSize                 | 65536         | Socket buffer size (bytes)    |
| Prefetch       | jms.prefetchPolicy.queuePrefetch | 1000          | Prefetch count for Queue      |
| Prefetch       | jms.prefetchPolicy.topicPrefetch | 1000          | Prefetch count for Topic      |
| SSL            | needClientAuth                   | true          | Client certificate required   |
| SSL            | verifyHost                       | true          | Host verification active      |

### Common Usage Scenarios

| Scenario         | Protocol | Recommended URL                                                                                         |
| ---------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| Development      | AMQP     | `amqp://localhost:5672`                                                                                 |
| Development      | TCP      | `tcp://localhost:61616`                                                                                 |
| Test             | AMQP     | `failover:(amqp://test1:5672,amqp://test2:5672)?failover.maxReconnectAttempts=3`                        |
| Test             | TCP      | `failover:(tcp://test1:61616,tcp://test2:61616)?maxReconnectAttempts=3`                                 |
| Production       | AMQP     | `amqps://prod:5671?transport.trustStoreLocation=/certs/truststore.jks&failover.maxReconnectAttempts=-1` |
| Production       | TCP      | `failover:(tcp://prod1:61616,tcp://prod2:61616)?randomize=true&maxReconnectAttempts=-1`                 |
| High Security    | AMQP     | `amqps://secure:5671?transport.verifyHost=true&transport.trustStoreLocation=/certs/truststore.jks`      |
| High Security    | TCP      | `ssl://secure:61617?needClientAuth=true&keyStore=/certs/keystore.jks`                                   |
| High Performance | AMQP     | `amqp://fast:5672?jms.prefetchPolicy.all=2000&amqp.maxFrameSize=1048576`                                |
| High Performance | TCP      | `tcp://fast:61616?tcpNoDelay=true&socketBufferSize=131072&wireFormat.maxFrameSize=104857600`            |

***
