Skip to main content
Version: Develop

Custom Parameters

RabbitMQ Custom Parameters

As mentioned in Using an a9s Data Service - Custom Parameters as an end user, an Application Developer has the opportunity to customize their Service Instance by using custom parameters.

consumer_timeout

RabbitMQ's consumer_timeout parameter, see Delivery Acknowledgement Timeout, can be specified via the custom parameter consumer_timeout.

An integer value greater than or equal to 1800000 is expected. The default value is 1800000. The unit is milliseconds.

tls-protocols

You can specify the TLS protocol version via the custom parameter tls-protocols. The custom parameter tls-protocols correlates with RabbitMQ's configuration parameter ssl_options.versions, see Limiting TLS Versions Used by the Server.

An array with protocol versions is expected. The allowed protocol version values are tlsv1.3 and tlsv1.2.

tls-ciphers

You can limit the TLS ciphers via the custom parameter tls-ciphers. The custom parameter tls-ciphers correlates with RabbitMQ's configuration parameter ssl_options.ciphers, see Configuring Cipher Suites.

An array with cipher names is expected.

caution

There is no validation enabled for the user provided value and therefore existing instances can break when applying this parameter.

Use RabbitMQ Plugins

a9s Messaging allows to enable the following RabbitMQ plugins:

  • rabbitmq_consistent_hash_exchange
  • rabbitmq_federation
  • rabbitmq_federation_management
  • rabbitmq_mqtt
  • rabbitmq_sharding
  • rabbitmq_shovel
  • rabbitmq_shovel_management
  • rabbitmq_stomp
  • rabbitmq_tracing
  • rabbitmq_webstomp (available with a9s Messaging 4.0 and above)
  • rabbitmq_webmqtt (available with a9s Messaging 4.0 and above)

Plugin Activation

You can activate RabbitMQ plugins with the cf create-service and cf update-service commands using additional configuration parameters.

cf create-service a9s-messaging313 rabbitmq-single-small my-messaging-service \
-c '{ "plugins": ["rabbitmq_shovel", "rabbitmq_shovel_management"] }'
cf update-service my-messaging-service \
-c '{ "plugins": ["rabbitmq_shovel", "rabbitmq_shovel_management"] }'

Plugins for Protocols

Some plugins that can be enabled with a9s Messaging provide additional protocols for use with RabbitMQ. The usernames and passwords for these protocols are the same as with the default ACMQ protocol. Protocols enabled via plugin will be set to the default \ RabbitMQ vhost.

ProtocalTCP PortSSL PortFurther information
MQTT18838883RabbitMQ MQTT Docs
WebMQTT1567515676RabbitMQ MQTT Docs
STOMP6161361614RabbitMQ STOMP Docs
WebSTOMP1567415673RabbitMQ STOMP Docs

Create Messaging Users

a9s Messaging allows to create new users with different roles (permissions) by creating service keys.

The possible roles are:

  • management
  • policymaker
  • monitoring
  • administrator

You can read more about RabbitMQ roles and permissions here.

Create a New Role

You can create a new user with specific permissions (roles) giving the role following custom parameter. This parameter receives an array of roles:

cf create-service-key my-messaging-service my-key -c '{"roles": ["administrator", "management"]}'

Using High Availability Queues in Cluster Setup

If clusters are enrolled, this does not mean that all created queues are HA queues!

High Availability in a9s Messaging 4.X and above

For a9s Messaging 4.X and above, HA is available by default for all quorum queues. The mirrored classic queues from the previous RabbitMQ versions were removed and the still existing classic queues are not able to be replicated anymore.

High Availability in a9s Messaging 3.13 and below

For a9s Messaging 3.13 and below, there are two policies defined to allow HA queues and no HA queues. These policies are depending on the queue name.

If the queue name starts with ha. the queue is a HA queue and consists of clusternodecount/2 + 1 queues (one master queue and the rest mirror queues).

This guarantees that in the case of a network partition, the queue is still available in the bigger partition. Additionally, it allows to use most of performance of the clusternodes, by reducing replication and queues.

Additionally there is another policy for not important queues, this policy is for all queues starting with noha., in this case the queue is not mirrored and if the node which hold this queue goes down, the queue is also not available anymore.

Using Custom Policies in RabbitMQ

caution

Important: The a9s Messaging 3.13 and below services configure by default two policies named ha and noha. These policies will always be reconfigured on a restart of a RabbitMQ Service Instance. Therefore they shouldn't be changed manually.

To create and use custom policies, please see Parameters and Policies — RabbitMQ