thoredge
thoredge

Reputation: 12591

Configuring ActiveMQ Artemis client connection in WildFly

Is the ActiveMQ connection configuration URI properties, for example clientID only possible to set through the URI?

I've used a setup similar to this. However, here the connection endpoint is defined as remote-connector which leaves no room for URI query parameters:

<outbound-socket-binding name="remote-artemis">
    <remote-destination host="127.0.0.1" port="5445"/>
</outbound-socket-binding>

Upvotes: 1

Views: 1198

Answers (1)

Justin Bertram
Justin Bertram

Reputation: 34973

You can do this using the client-id attribute on the connection-factory you've defined to connect to the remote instance of ActiveMQ Artemis, e.g.:

...
<remote-connector name="my-remote-connector" socket-binding="remote-artemis" />
...
<connection-factory name="MyRemoteConnectionFactory" entries="java:/MyRemoteConnectionFactory" connectors="my-remote-connector" client-id="myClientID" />
...

You can set any of these other attributes on the connection-factory as outlined in the XML schema:

  • ha
  • factory-type
  • discovery-group
  • enable-amq1-prefix
  • use-topology-for-load-balancing
  • client-failure-check-period
  • connection-ttl
  • call-timeout
  • call-failover-timeout
  • consumer-window-size
  • consumer-max-rate
  • confirmation-window-size
  • producer-window-size
  • producer-max-rate
  • protocol-manager-factory
  • compress-large-messages
  • cache-large-message-client
  • min-large-message-size
  • dups-ok-batch-size
  • transaction-batch-size
  • block-on-acknowledge
  • block-on-non-durable-send
  • block-on-durable-send
  • auto-group
  • pre-acknowledge
  • retry-interval
  • max-retry-interval
  • reconnect-attempts
  • failover-on-initial-connection
  • connection-load-balancing-policy-class-name
  • use-global-pools
  • scheduled-thread-pool-max-size
  • thread-pool-max-size
  • group-id
  • deserialization-white-list
  • deserialization-black-list
  • initial-message-packet-size

You can set transport properties on the remote-connector itself, e.g.:

...
<remote-connector name="my-remote-connector" socket-binding="remote-artemis">
   <param name="" value="" /> 
</remote-connector>
...

Upvotes: 2

Related Questions