Thursday, April 12, 2012

How to remove the block in Oracle ESB Resequencer?

A Resequencer is used to rearrange a stream of related but out-of-sequence messages back into order. The messages are rearranged on an identifier that is a part of the message. The Resequencer should be aware of the identifier sequence for rearranging the messages. While rearranging the messages, the Resequencer typically uses the identifier sequence to decide the position of a message.

In resequencer the message that generates an error is moved to the error hospital. The group is moved to an error state and is not picked up by the dequeue system of any ESB instance. The user can resubmit the error-generating message using the error hospital. On resubmission of the message, the group is moved to a normal state, so that it can be picked up by the dequeue system of any ESB instance.

Example:

'ProcessSalesOrderFulfillmentSiebelCommsSequencer' resequencer is grouped with AccountId, If an order for customer X fails, then the resequencer will not allow new orders for same customer X to process. You will not see errors any errors.

To enable the block to process further orders from the customer X, you need to execute below scripts in ORAESB schema.

Note: You need to executed the script, only if the errored problem is fixed.

1) select GUID from wf_events where Name = '<Resequencer ESB Service Name>';

2) update esb_group_status set error=0, lockConId='NONE' where error!=0 and group_id='<GROUP_ID>' and service_guid='<GUID>';

3) commit;

Example:

-- Get service_guid(B4B82FA18B3911DEBFD0D7F6B776077D)
select guid from wf_events where name = 'ProcessSalesOrderFulfillmentSiebelCommsSequencer'

-- Account Id(1-70KX)
update esb_group_status set error=0, lockConId='NONE' where error!=0 and group_id='1-70KX' and service_guid='B4B82FA18B3911DEBFD0D7F6B776077D';
commit;

1 comment:

  1. Thanks for sharing Ziaur. This helped me a lot. Further, I have query that, why actually we need a resequencer. For example, when we place an orderfrom siebel it goes to the respective queue in middleware and further the concerned consumer picks up the request which is resequencer enabled. Say I have placed 3 orders from siebel and each order will go in individual ABM. However the orders are fed into the queue, the orders will be processed since the order is specified in an individual ABM. Please explain me why do we enable resequencer. Thank you

    ReplyDelete