Tutorial V2.41 (Lightning)

  1. Home
  2. Docs
  3. Tutorial V2.41 (Lightning)
  4. 31. What are queues and where is it used?

31. What are queues and where is it used?

This tutorial contains the detail to help you understand what are queues,
create them and describes how to use it.

1.  What is queues?

Queue is dynamic object, which created automatically based on interface group. You have to remember if you do not define an interface group SKYVVA will create a default interface group with the name “skyvva_DefaultIG”. Each interface group will be created queues.

2.  Queue detail

This documentation will be described more in detail about queue handling.  The processing message has generally to done in queues because of these advantages:

– Keeping order of arriving data
– Prioritize of queue
– Parallel processing of queues
– Stop / Start queue for administration purpose

The queue name derived from three information:

– Integration Id
– Interface group Id
– Interface Id + {EO, EOIO}

There are two types of queue, which are EO and EOIO. This property is inherit from
interface group.

2.1  EO-Queue

When the interfaces does not relate to each other and does not have depending sequence then you can define this group as an EO-Group. This queue is to group different interfaces with small amount of data together, to improve the performance of processing.

2.2  EOIO-Queue
This type of queue is the opposite way of the EO-Queue. EOIO-Queue is the interface account and contact. In Salesforce you have to split the data into two different table e.g. into account and contact table. If you post the contact before account than you will get an error because the contact reference an account. The account is the parent of the contact and therefore has to be posted before.

To achieve this goal you have to define an interface group e.g.  “Acccount_Contact” with the property type = EOIO. Then specify the sequence number 1 for the interface account and the sequence number 2 for the interface contact .

2.3 Parallel processing of queue
Parallel processing is possible because the data in different queue is not related to each other and therefore can be posted independently. We have in best case five apex job as worker to do parallel processing. The maximum parallelization is 5 due to the SF limit of
5 batch apex job.

2.4  Status of queue
This section will be explained about the status of queue and how each status works.
There are 6 status of queues.

– Ready
– Worker
– Running
– Failed
– Hold
– Stop by Admin

Description:

1.  Status Worker: This status is a temporarily status which is set by the scheduler. This status is a helping status to know that the scheduler has pass the data package / queue to the worker. When the worker start to process the data package / queue it will change the status from “Worker” to “Running”.
2.  Status Running: This status is set from the worker. When a data package / queue is pass from the scheduler to the worker the status of this queue is “Worker”. Then the worker change the status from “Worker” to “Running”.
3.  Status Fail: This status is set when processing a data package / queue got failed. This status is only used for the EO-Queue. For the EOIO-Queue this status is not used but the status “Hold”.
4.  Status Hold: This status is set when processing a data package / queue got failed. This status is only used for the EOIO-Queue. For the EO-Queue this status is not used but the status “Failed”. When the status is set to “Hold” then the processing of this queue is stopped because otherwise you will create an overtaken of data.
5.  Stop by Admin: This status is the result from an admin action. An admin might want to stop the queue because of maintenance work.

2.5  Administration of queue
Administrator can stop a queue so that it will not be processed by the scheduler. This might happen if the queue has accidentally too many entries and will take long time to process.
To stop a queue, please follow given steps:
– Open your integration,  Click on batch control board

– Select “Queues” tab

– Click on “Stop” button to stop the queue

– The system will ask you again for the confirmation. If you really sure that you want to stop the queue just click OK.

As you can see from the above screenshot, the link has been change from “Stop” to “Start”. The status also changed.

3.  Where to use queue?

Queue is used in Batch processing and CDT.

 

Articles

Was this article helpful to you? Yes No

How can we help?