OK Riyadh,

Now your requirement is clear to me. Please see my comments inline;

Riyadh wrote:
Hi  Ruwan,
We are not concerned about the successful delivery but only successfull sending from a sequence!! neverthless the solution that you gave in the last mail was really helpful for me to understand how i can capture the delivery. I am restating my requiremetns again here with the aggregation previous mails:) Requirements: "We have a clone mediator which clones the same message to a number of sequence mediators where each sequence mediator contains a set of mediators. Each sequence is basically associated to a service and the sequence itself decides whether the service should receive the message or not. Consequently each sequence has a send mediator at the end in the sequence to send the message to the service. Any sequence mediator in the clone may drop the message before it reaches the send mediator. So requirement does not prohibit sending message out from any sequence if any other sequnce fails. At the end of clone we want to determine that to which services the message was sent and not sent and log this infromation. We will use our custom log mediator to log it. We want to log (containing the information of service endpoints to which the message was sent and not sent ) only once after the clone considering that each sequence in the clone mediates the same message copy.
Well I think you can use a DBReport mediator before each and every drop to report dropped messages to the database and a DBReport mediator after the send mediator to report the messages that has been sent out, and then write your own custom mediator to log the information fetched from the database. In-order to do this you will require the access to a database.

I think the above point is clear to you. Have a look at the DBReport mediator sample (http://wso2.org/project/esb/java/1.6/docs/ESB_Samples.html#Sample361)

Now the problem is how you can figure out the end of the mediation of all the cloned messages, so that we can put the custom mediator that you are going to write to fetch the information from the database and log them as per your requirement.

It is not that easy to find the finishing point because all these are independent messages inside synapse, So if it is OK to have some delay in logging these messages, you could right a Task (http://wso2.org/library/2900) to log the messages rather than a mediator, so that the task can be scheduled to wakeup in a given interval and check for the reported messages in the database and figure out the messages which are with a common aggregateCorelation and log them and mark them as logged in the database (or delete them from db) so that you wont log the same information over and over. Have a look at the sample task here (http://wso2.org/project/esb/java/1.6/docs/ESB_Samples.html#Task)

Will this be helpful? It is really hard to figure out the end of every cloned messages since they are independent and processed in parallel.

Thanks,
Ruwan
Now if any sequence in the clone fails, the message is not sent to the corresponding service. How do i capture the information (containing the information of service endpoints to which the message was sent and not sent ) at the end of clone?" I hope i could explain better now:). we tryed to use a custom mediator right after the clone (with continueparent = true) thinking that we would get info after the clone and log it once. But we failed to do that!!!! It seems control never passes after the clone!!! Thank you again. Riyadh

On Tue, Mar 18, 2008 at 7:50 AM, Ruwan Linton <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Riyadh,

    Riyadh wrote:
    > Hi Ruwan,
    >
    > >>Isn't there a requirement saying that if one sequence drops
    the message
    > >>non of the sequences are going to send the message out. I
    understood
    > >>your requirement like that..... Please correct me if I am wrong.
    >
    > No..my requirement does not prohibit sending message out from any
    > sequence if any other sequnce fails. i have to capture only the
    > services to which the message was successfully sent from the
    > corresponding sequnce.
    AAAAAhhhhhhhh... Sorry, I was making it complex. Well, there is no way
    inside synapse that we can detect the successful delivery at least for
    the moment. But you could simulate this using the response message
    from
    the server, assuming this is a two way communication.

    You need to set the address to which you send the message as a message
    property using the property mediator before sending the message
    out and
    these properties will be available in the response from the server. So
    when the response arrives to ESB, you could use the above property
    that
    we set to the message to retrieve the service endpoint, since you got
    the response you can guarantee that the message has been delivered to
    the appropriate service.

    Will this be OK with you?

    Thanks,
    Ruwan


    _______________________________________________
    Esb-java-dev mailing list
    [email protected] <mailto:[email protected]>
    http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev


------------------------------------------------------------------------

_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev


_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to