Link

Setting concurrent conversion threads

Table of contents

  1. What is its function
  2. How to set this value
  3. Default Value
  4. How to use with Docker

What is its function

This option allows you to specify the number of threads to run conversions concurrently. If more requests than this are made the microservice will wait for a thread to become available.
This function is controlled by 1 config property.

  1. conversionThreadCount - The number of threads to run conversions

How to set this value

Create the following Java properties file on the server running your app server (if you don’t already have one) {user.home}/.idr/jpedal-microservice/jpedal-microservice.properties

In this file add (or update if the key already exists) the following key and value pair.

  1. conversionThreadCount - This can be a value between 1 and 2,147,483,647 although using more threads than CPU cores will cause conversions to run slower the more threads as they have to wait for cores to be open.
    e.g conversionThreadCount=10

Default Value

When no values are provided or invalid values are provided the default value used is the number of processors available. This will differ between different machine and prevents conversions having to wait for processing time whilst others are converting.

How to use with Docker

In order to provide your own properties file to the Docker image you need to mount the properties file to the image. This is done by adding the following to your docker run command.

--mount "source=/path/to/properties/directory/jpedal-microservice.properties,target=/root/.idr/jpedal-microservice/jpedal-microservice.properties,type=bind"