Apart from batch deleting of the events from the default queue, do we have any way to delete a particular message based on either eventid or any other unique id. As of now I'm able to use the DeleteEvents method provided by Integration Events webservice which only does the batch deleting based on DateTime or LastEventId. But as there will other events also related to other workflows and I do not want to delete them. I want to delete only the events that I've read and want to know how.
Thanks in advance, waiting for replay.
After retrieving the Event from the Queue, using GetEvents method, we wish to delete it.
The DeleteEvent method does not support deleting the specific event and delete all events in that batch.
The arguments that the DeletEvents method accept is the DateTime and LastEventId and if not provided any arguments then it will delete all the messages in the queue. But our requirement is to delete only the events that we have read or which events that are corresponding to our events.
Do we need to use a separate named queue for the events?
Guys I'm eagerly looking for response, its an urgent situation for me.
Here is the issue in more simplified way:
I'm calling the default queue in CRM On Demand and successfully able to retrieve the events from the queue into my SOA process. The SOA process will receive all the events from the queue and I'm filtering them and processing only the events that are required to me. Now I want to delete the events from default queue which I have processed. The problem is that the DeleteEvent method is accepting only two arguments LastEventId and DataTime. In both the cases the other events will also be deleted and I need to restrict this. But wondering how to do this.
Please help me.
one more thing i can tell you, if you are creating an array for events ,then you can observe that all events have same eventid, so on deleting any specific one through this id will become impossible because it delete all events related with this id.
Thanks Harshad, what to do if few other processes are posting their transactions (via workflow) to the same queue?
If I delete based on eventId, this will delete their transactions as well even before they have read it!
As you are saying to use workflow for this, but as we know workflows are used for trigger events only and perform operations on records but not use for apply operations on events. So i think workflow will not do any thing.
And as many processes are doing transaction, if you are making one program then this program will run by reading one by one event in queue , your program will not show further next event until you refresh/delete the queue.
and this will be possible if EventCount=1
meaning is that until you delte the current event you can not see next event in this program ,so no chances of miss.
so there is no chance of miss any transaction