Hi Shubh,
Suggestion on EM Queue Optimization and Performance:
To optimize the queue on performance side and you have to create custom queue names to process large amounts of sales orders as suggested by Steffen. Create 5 or 10 custom queues for Sales Order event handler, so if you create 1000 sales orders in an hour then it would end up and split into 10 queues*100.
Also, you can define queue names last digits to split and process in same queue.
v_last_digit = vbeln+9(1).
case v_last_digit.
when 1 or 2.
concatenate 'Z_SORDER' 'A' into v_queue.
when 3 or 4.
concatenate 'Z_SORDER' 'B' into v_queue.
when 5 or 6.
concatenate 'Z_SORDER' 'C' into v_queue.
when 7 or 8.
concatenate 'Z_SORDER' 'D' into v_queue.
when 9 or 0.
concatenate 'Z_SORDER' 'E' into v_queue.
endcase.
condense v_queue.
Source from Kevin’s blog post where he suggested to define the queue names.
If one queue failed in Sales Order then other queues will process without any issues. Also, this will be easy to split LUW to process in different queues and you can consult with ABAP’er and Basis team to route the queues to different application servers if they can. Refer this queue template /SAPTRX/QUEUE_NAME_TEMPLATE, where you can copy this template and write custom function based on this requirement.
SAP standard Function module /SAPTRX/QUEUE_NAME_DETERMINE determines whether it has to determine custom queue or standard queue EM_*(Business Process Type).
We cannot hold failed queues for more than one hour, so you can implement CCMS Alert monitoring to trigger alert immediately to support team inbox email /mobile applications (consulting SAP OSS notes are available online).
Let me know your outcome and progress, we can suggest you ongoing development.
Regards
GGOPII