IS it possible to have dependency between queued items

I want a feature where there can be 2 items in the queue, and i dont want to process the 2 queued item if the 1st queued item processing fails when using with non-asp.net application.

Is there a way to impose sequential queue execution and with dependecy.

Just like in .net TPL ContinueWith option?