You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
The Web Service Multithreaded Worker is designed to be used with the Web Service Multithreaded component. For steps on setting up and running the two components, see the documentation for the Web Service Multithreaded.
The worker component handles the actual processing of the data dispatched by the ServerComponent
. The component’s custom fields contain a ThreadCount
value used to create multiple worker component threads running in parallel to process several requests simultaneously.
Adapting the Component:
There are a few ways you can adapt and expand this component for more complex workflows:
Configure the ThreadCount
On startup, the component spins up the configured number of ThreadCount
to handle inbound requests. Depending on the volume expected, you can set the ThreadCount
to any number between 2 and 100.
Add data processing logic
Inbound requests are sent from the Web Service Multithreaded component as JSON strings. Requests are parsed and at this point, any data processing can be implemented.
Customize the response
A general response is constructed and sent back to the web service. If adapted, the response must contain three pieces of information:
You must first use WEBsetResponseHeaders
to set the required response headers as they contain connection information for which request to respond to.
You can include any additional headers required.
You can customize the response body.
Once constructed, component.call
is used to call the WEBrespond
function in the Web Server component with the response data so it can respond to the source connection.