This discussion is archived
3 Replies Latest reply: Jul 19, 2013 1:19 PM by 5326163d-2885-42fb-ad90-c1157e19fd4a RSS

OSB sequencing with Unit of Order: Error Handling

591355 Newbie
Currently Being Moderated
Hello Gurus,



IHAC that's willing to sequence messages ( for some business reasons). We are currently using OSB 11g and the OSB solution proposed is using the Unit of Order (UoO) with a JMS.


Everything seems to be fine except the error handling. As soon as a message fails the following messages will wait in the queue (expected behavior) .


And now the problem:

The customer is not willing to send all messages again so they just want to send a corrected message and continue the sequence again (if message 1 fails send message 1b).

As you can imagine as soon as you send the corrected message it will go to the end of the queue (sequence) ... so not nice and it's not a correct solution.



In the documentation there is no explicit information about how to handle this situation :-( ... So I needed to figure out a solution and here you have one approach:

1. The idea should be to move the messages following the incorrect one ( for example : 2,3,4, ...) to an intermediate queue

2. This will make to have just the faulted message in the queue (1)

3. Send corrected message (1b)

4. Delete the message (1)

5. Message 1b ( that is the same in sequence from the business point of view) will be processed and completed correctly

6. Move messages again back to the queue from the intermediate queue ( 2,3,4,5,6 ...)

7. Messages will be processed in order and we will have avoided to send all messages again.



This solution could be fine but now we have the following issues:

1. We need to ensure messages to be moved in the same order of the sequence ( to maintain the sequence) and automatically (probably from a JMX based application)

2. we need to move back messages again. Once the issue is solved with message 1b we will move from the intermediate queue to the original queue and in the same sequence they were originally and automatically.



...



Other issues:

1. How to handle multiple groups? ( I cannot imagine doing this with multiple groups ... It can be quite annoying)

2. How to ensure new messages (7,8,9, ...) don't arrive in the queue interfering the corrected message (1b). For example having in the queue something like (1, 7, 1b, 8,9)

3. In case of setting up an Expiration Policy and Redirecting the message that fails to an 'Error queue', following messages are processed ... (2,3,4,5, ...). Any way of avoiding this?





Other solution I have realized is to add a check in the proxy that is polling the queue so in case there is a message in the 'ErrorQueue' (not too sure about the consequences of this proposal ... :-( ) stop processing messages.

..........



I hope someone working with OSB can propose me a solution or can help me with this problem.

FINAL QUESTION
Is there any way of solving this problem with OSB? (without using BPEL and mediator sequences)



Thanks in advance

Luis
  • 1. Re: OSB sequencing with Unit of Order: Error Handling
    591355 Newbie
    Currently Being Moderated
    Hello,

    Other update:

    We have also considered to use a global flag so if the group has a message failing we will mark the group as faulted so next time proxy try to process messages from that group we will check the flag and as it is failing we will not process it.

    Any integration solution to this UoO sequencing error handling will be welcome.

    Thanks and Regards
    Luis
  • 2. Re: OSB sequencing with Unit of Order: Error Handling
    591355 Newbie
    Currently Being Moderated
    Hello,

    Anybody can help me with this issue?

    Regards
    Luis
  • 3. Re: OSB sequencing with Unit of Order: Error Handling
    5326163d-2885-42fb-ad90-c1157e19fd4a Newbie
    Currently Being Moderated

    If I were in this situation, without getting too technical, I would solve this from the design perspective.

     

    1) Q1 -> A queue where all regular messages (1,2,3,4,5....) are placed.

    2) Q2 -> A queue where the Error Fix messages are placed (1b).

    And whenever there is an error, the next message will be read from the Q2 (until the error is resolved and get back to Q1)

     

    This solves all of your problems mentioned:

    i) You neither have to copy messages back and forth to and from temporary queue. (2,3,4,5), nor worry about order of messages.

    ii) Further, you don't have to worry about messages that come after. (6,7,8...) as they will be placed in the queue Q1 after 5 (1,2,3,4,5,6,7,8).

     

    P.S: I am not sure, how relevant will this answer be, to author of this posting, as posting seems to be an year old.however, the answer might at least help somebody who land on this posting in future.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points